Changeset 487 for trunk/src/image/png_loader.cc
- Timestamp:
- 03/08/16 08:05:51 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/image/png_loader.cc
r486 r487 10 10 11 11 using namespace nv; 12 13 #if NV_COMPILER == NV_CLANG 14 #pragma clang diagnostic ignored "-Wunused-macros" 15 #pragma clang diagnostic ignored "-Wold-style-cast" 16 #pragma clang diagnostic ignored "-Wsign-conversion" 17 #pragma clang diagnostic ignored "-Wreserved-id-macro" 18 #pragma clang diagnostic ignored "-Wmissing-prototypes" 19 #define NULL 0 20 #endif 12 21 13 22 enum … … 322 331 }; 323 332 333 static int iabs( int a ) 334 { 335 return a < 0 ? -a : a; 336 } 337 324 338 static int stbi__paeth( int a, int b, int c ) 325 339 { 326 340 int p = a + b - c; 327 int pa = abs( p - a );328 int pb = abs( p - b );329 int pc = abs( p - c );341 int pa = iabs( p - a ); 342 int pb = iabs( p - b ); 343 int pc = iabs( p - c ); 330 344 if ( pa <= pb && pa <= pc ) return a; 331 345 if ( pb <= pc ) return b; … … 1050 1064 case 3: format.format = RGB; break; 1051 1065 case 4: format.format = RGBA; break; 1052 default: return false;1066 default: return nullptr; 1053 1067 } 1054 1068 size = ivec2( x, y );
Note: See TracChangeset
for help on using the changeset viewer.