Skip to content

Commit

Permalink
Quiet some compiler warnings about &&/|| precedence.
Browse files Browse the repository at this point in the history
  • Loading branch information
cscott committed Nov 16, 2011
1 parent cf4e066 commit 1e83b94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imageloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Image* loadBMP(const char* filename) {
assert(!input.fail() || !"Could not find file");
char buffer[2];
input.read(buffer, 2);
assert(buffer[0] == 'B' && buffer[1] == 'M' || !"Not a bitmap file");
assert((buffer[0] == 'B' && buffer[1] == 'M') || !"Not a bitmap file");
input.ignore(8);
int dataOffset = readInt(input);

Expand Down Expand Up @@ -209,7 +209,7 @@ Image* loadPNG(const char* filename) {
//check if png file
char buffer[8];
input.read(buffer, 8);
assert(buffer[1] == 'P' && buffer[2] == 'N' && buffer[3] == 'G'
assert((buffer[1] == 'P' && buffer[2] == 'N' && buffer[3] == 'G')
|| !"Not a png file");

char* data;
Expand Down

0 comments on commit 1e83b94

Please sign in to comment.