Bodmer / JPEGDecoder

A JPEG decoder library
Other
220 stars 64 forks source link

Remove unused min define #42

Closed sieren closed 4 years ago

sieren commented 5 years ago

Not sure where this is used in the first place, seems like the jpg_min define is the one that's used now. Remove unused min define as it causes compilation errors when compiling with ESP-IDF and the C++14 STL.

Not sure if this clashes with some C function or something, since the STL min should be in the std namespace.

/Users/sierenmusic/Documents/Development/HC2/HomeControl/main/libraries/JPEGDecoder/src/JPEGDecoder.h:77:20: error: expected unqualified-id before '(' token
   #define min(a,b) (((a) < (b)) ? (a) : (b))
                    ^
[ 10%] Building C object esp-idf/driver/CMakeFiles/idf_component_driver.dir/rmt.c.obj
/Users/sierenmusic/Documents/Development/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/bits/locale_conv.h: In member function 'bool std::wbuffer_convert<_Codecvt, _Elem, _Tr>::_M_conv_get()':
/Users/sierenmusic/Documents/Development/HC2/HomeControl/main/libraries/JPEGDecoder/src/JPEGDecoder.h:77:20: error: expected unqualified-id before '(' token
   #define min(a,b) (((a) < (b)) ? (a) : (b))
                    ^
/Users/sierenmusic/Documents/Development/HC2/HomeControl/main/libraries/JPEGDecoder/src/JPEGDecoder.h:77:20: error: expected unqualified-id before '(' token
   #define min(a,b) (((a) < (b)) ? (a) : (b))
Bodmer commented 4 years ago

Done, thanks.