Max Derhak
-
2012-08-31
- status: open --> pending
In CIccMBB there is this declaration for NewCopy():
virtual CIccTag* NewCopy() const {return new CIccMBB(*this);}
However in CIccTagLutAtoB and CIccTagLutBtoA, the situation is like this:
virtual CIccTag* NewCopy() { return new CIccTagLutAtoB(*this); }
The "const" is missing. I have had a case where I had an object of type CIccTagLutAtoB. When NewCopy() was called on it the one in CIccMBB (the base class) gets run. This is unwanted. Adding "const" to the declaration in the derived classes, solves the problem, and their NewCopy() is run. CIccTagLut16 and CIccTagLut8 have "const" in their declaration of NewCopy().