Make compilation unit rtengine/labimage.cc -Wextra clean, #4155

This commit is contained in:
heckflosse
2017-10-21 22:55:07 +02:00
parent c8ac93676e
commit 3570550ac9
2 changed files with 64 additions and 41 deletions

View File

@@ -25,32 +25,8 @@ namespace rtengine
class LabImage
{
private:
bool fromImage;
void allocLab(int w, int h)
{
L = new float*[H];
a = new float*[H];
b = new float*[H];
void allocLab(int w, int h);
data = new float [W * H * 3];
float * index = data;
for (int i = 0; i < H; i++) {
L[i] = index + i * W;
}
index += W * H;
for (int i = 0; i < H; i++) {
a[i] = index + i * W;
}
index += W * H;
for (int i = 0; i < H; i++) {
b[i] = index + i * W;
}
};
public:
int W, H;
float * data;
@@ -64,20 +40,8 @@ public:
//Copies image data in Img into this instance.
void CopyFrom(LabImage *Img);
void getPipetteData (float &L, float &a, float &b, int posX, int posY, int squareSize);
void deleteLab( )
{
if (!fromImage) {
delete [] L;
delete [] a;
delete [] b;
delete [] data;
}
}
void reallocLab( )
{
allocLab(W, H);
};
void deleteLab();
void reallocLab();
};
}