Skip to content

Commit

Permalink
Fix code where a string literal and an integer are added to together.…
Browse files Browse the repository at this point in the history
… This is treated as pointer arithmetic since the string literal is a pointer to a const char.

git-svn-id: http://zxing.googlecode.com/svn/trunk@2246 59b500cc-1b3d-0410-9834-0bbf25fbcc57
  • Loading branch information
gln%google.com@gtempaccount.com committed Apr 2, 2012
1 parent 7df09d4 commit 657db43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cpp/core/src/zxing/common/GreyscaleLuminanceSource.cpp
Expand Up @@ -35,7 +35,7 @@ GreyscaleLuminanceSource::GreyscaleLuminanceSource(unsigned char* greyData, int


unsigned char* GreyscaleLuminanceSource::getRow(int y, unsigned char* row) { unsigned char* GreyscaleLuminanceSource::getRow(int y, unsigned char* row) {
if (y < 0 || y >= this->getHeight()) { if (y < 0 || y >= this->getHeight()) {
throw IllegalArgumentException("Requested row is outside the image: " + y); throw IllegalArgumentException("Requested row is outside the image.");
} }
int width = getWidth(); int width = getWidth();
// TODO(flyashi): determine if row has enough size. // TODO(flyashi): determine if row has enough size.
Expand Down
Expand Up @@ -39,7 +39,7 @@ GreyscaleRotatedLuminanceSource::GreyscaleRotatedLuminanceSource(unsigned char*
// The API asks for rows, but we're rotated, so we return columns. // The API asks for rows, but we're rotated, so we return columns.
unsigned char* GreyscaleRotatedLuminanceSource::getRow(int y, unsigned char* row) { unsigned char* GreyscaleRotatedLuminanceSource::getRow(int y, unsigned char* row) {
if (y < 0 || y >= getHeight()) { if (y < 0 || y >= getHeight()) {
throw IllegalArgumentException("Requested row is outside the image: " + y); throw IllegalArgumentException("Requested row is outside the image.");
} }
int width = getWidth(); int width = getWidth();
if (row == NULL) { if (row == NULL) {
Expand Down

0 comments on commit 657db43

Please sign in to comment.