diff --git a/cwCommon.h b/cwCommon.h index e972be6..6dad1c7 100644 --- a/cwCommon.h +++ b/cwCommon.h @@ -45,7 +45,8 @@ namespace cw kFileNotFoundRC, // 26 kTestFailRC, // 27 kInvalidStateRC, // 28 - kBaseAppRC // 29 + kTypeMismatchRC, // 29 + kBaseAppRC // 30 } cwRC_t; typedef unsigned rc_t; diff --git a/cwCommonImpl.h b/cwCommonImpl.h index a033b4a..72afcf9 100644 --- a/cwCommonImpl.h +++ b/cwCommonImpl.h @@ -18,7 +18,7 @@ #include #include #include - +#include #if defined(OS_LINUX) || defined(OS_OSX) #define cwPOSIX_FILE_SYS @@ -158,7 +158,10 @@ namespace cw const char* label; } idLabelPair_t; + // Return nullptr if id is not found. const char* idToLabel( const idLabelPair_t* array, unsigned id, unsigned eolId ); + + // Returns eolId if the id is not found. unsigned labelToId( const idLabelPair_t* array, const char* label, unsigned eolId ); @@ -182,7 +185,7 @@ namespace cw template< typename T > bool is_even( const T& t ) { - assert( is_integral(t) ); + //assert( std::is_integral(t) ); return (t % 2) == 0; }