Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

Commit

Permalink
More const-correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
cfeck committed Mar 22, 2012
1 parent 786585a commit f1ba474
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions image.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Image
int width() const { return m_width; }
int height() const { return m_height; }
ptrdiff_t samplesPerLine() const { return m_spl; }
const Sample *data() const { return m_data; }
Sample *data() const { return m_data; }

void setWidth(int width) { m_width = width; }
void setHeight(int height) { m_height = height; }
Expand All @@ -26,7 +26,7 @@ class Image
int m_width;
int m_height;
ptrdiff_t m_spl;
const Sample *m_data;
Sample *m_data;
};

} // namespace IZ
Expand Down
2 changes: 1 addition & 1 deletion portableimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ bool PortableImage::readHeader(const unsigned char *p)
setSamplesPerLine(m_components * m_width);

++p; // skip single space
m_data = p;
m_data = (unsigned char *) p;
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ char decodeTable[1 << CONTEXT_BITS][MAX_CODE_VALUE];

static int comp_int(const void *p1, const void *p2)
{
return *((int *) p1) - *((int *) p2);
return *((const int *) p1) - *((const int *) p2);
}

static void initBitsTable()
Expand Down

0 comments on commit f1ba474

Please sign in to comment.