More changes to compatibility with platforms that do not support 8 bit types.

This commit is contained in:
John Wellbelove 2017-07-09 10:40:44 +01:00
parent 72ce7ac6e3
commit 0cee4dab07

View File

@ -252,7 +252,7 @@ namespace etl
private: private:
// Determines the index of the best unsigned type for the required value. // Determines the index of the best unsigned type for the required value.
static const int TYPE_INDEX = ((VALUE > UINT8_MAX) ? 1 : 0) + static const int TYPE_INDEX = ((VALUE > UINT_LEAST8_MAX) ? 1 : 0) +
((VALUE > UINT16_MAX) ? 1 : 0) + ((VALUE > UINT16_MAX) ? 1 : 0) +
((VALUE > UINT32_MAX) ? 1 : 0); ((VALUE > UINT32_MAX) ? 1 : 0);
@ -273,7 +273,7 @@ namespace etl
private: private:
// Determines the index of the best signed type for the required value. // Determines the index of the best signed type for the required value.
static const int TYPE_INDEX = (((VALUE > INT8_MAX) || (VALUE < INT8_MIN)) ? 1 : 0) + static const int TYPE_INDEX = (((VALUE > INT_LEAST8_MAX) || (VALUE < INT_LEAST8_MIN)) ? 1 : 0) +
(((VALUE > INT16_MAX) || (VALUE < INT16_MIN)) ? 1 : 0) + (((VALUE > INT16_MAX) || (VALUE < INT16_MIN)) ? 1 : 0) +
(((VALUE > INT32_MAX) || (VALUE < INT32_MIN)) ? 1 : 0); (((VALUE > INT32_MAX) || (VALUE < INT32_MIN)) ? 1 : 0);