Changeset 487 for trunk/src/image


Ignore:
Timestamp:
03/08/16 08:05:51 (9 years ago)
Author:
epyon
Message:
 
Location:
trunk/src/image
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/image/miniz.cc

    r486 r487  
    33
    44using namespace nv;
     5
     6#define MINIZ_NO_TIME
     7#define MINIZ_NO_ZLIB_COMPATIBLE_NAMES
     8
     9#define MINIZ_HAS_64BIT_REGISTERS 0
     10#define TINFL_USE_64BIT_BITBUF 0
     11
     12#if NV_COMPILER == NV_CLANG
     13#pragma clang diagnostic ignored "-Wunused-macros"
     14#pragma clang diagnostic ignored "-Wold-style-cast"
     15#pragma clang diagnostic ignored "-Wsign-conversion"
     16#endif
    517
    618#if defined( _M_IX86 ) || defined( _M_X64 ) || defined( __i386__ ) || defined( __i386 ) || defined( __i486__ ) || defined( __i486 ) || defined( i386 ) || defined( __ia64__ ) || defined( __x86_64__ )
  • trunk/src/image/png_loader.cc

    r486 r487  
    1010
    1111using 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
    1221
    1322enum
     
    322331};
    323332
     333static int iabs( int a )
     334{
     335        return a < 0 ? -a : a;
     336}
     337
    324338static int stbi__paeth( int a, int b, int c )
    325339{
    326340        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 );
    330344        if ( pa <= pb && pa <= pc ) return a;
    331345        if ( pb <= pc ) return b;
     
    10501064                case 3: format.format = RGB; break;
    10511065                case 4: format.format = RGBA; break;
    1052                 default: return false;
     1066                default: return nullptr;
    10531067                }
    10541068                size = ivec2( x, y );
Note: See TracChangeset for help on using the changeset viewer.