Makefile.am,cwCommonImpl.h : Implement use of cwWEB

This commit is contained in:
Gitea 2020-10-04 20:05:31 +00:00
parent 3baec05b71
commit 2df3933196
2 changed files with 22 additions and 4 deletions

View File

@ -22,8 +22,8 @@ libcwSRC += src/libcw/cwThread.cpp src/libcw/cwMutex.cpp src/libcw/cwThreadMach
libcwHDR += src/libcw/cwMpScNbQueue.h src/libcw/cwSpScBuf.h src/libcw/cwSpScQueueTmpl.h
libcwSRC += src/libcw/cwSpScBuf.cpp src/libcw/cwSpScQueueTmpl.cpp
libcwHDR += src/libcw/cwSvg.h src/libcw/cwAudioFile.h src/libcw/cwAudioFileOps.h
libcwSRC += src/libcw/cwSvg.cpp src/libcw/cwAudioFile.cpp src/libcw/cwAudioFileOps.cpp
libcwHDR += src/libcw/cwAudioFile.h src/libcw/cwAudioFileOps.h
libcwSRC += src/libcw/cwAudioFile.cpp src/libcw/cwAudioFileOps.cpp
if cwWEBSOCK
libcwHDR += src/libcw/cwWebSock.h src/libcw/cwWebSockSvr.h
@ -70,6 +70,9 @@ endif
libcwHDR += src/libcw/cwMdns.h src/libcw/cwEuCon.h src/libcw/cwDnsSd.h src/libcw/dns_sd/dns_sd.h src/libcw/dns_sd/dns_sd_print.h src/libcw/dns_sd/dns_sd_const.h src/libcw/dns_sd/fader.h src/libcw/dns_sd/rpt.h
libcwSRC += src/libcw/cwMdns.cpp src/libcw/cwEuCon.cpp src/libcw/cwDnsSd.cpp src/libcw/dns_sd/dns_sd.cpp src/libcw/dns_sd/dns_sd_print.cpp src/libcw/dns_sd/fader.cpp src/libcw/dns_sd/rpt.cpp
if cwWEB
libcwHDR += src/libcw/cwDataSets.h
libcwSRC += src/libcw/cwDataSets.cpp
else
libcwHDR += src/libcw/cwSvg.h src/libcw/cwDataSets.h
libcwSRC += src/libcw/cwSvg.cpp src/libcw/cwDataSets.cpp
endif

View File

@ -186,6 +186,21 @@ namespace cw
return (t % 2) == 0;
}
#if defined(cwWEB)
template< typename T>
bool is_int(const T& x)
{ return false; }
template<> inline bool is_int<signed char>( const signed char& x ) { return true; }
template<> inline bool is_int<unsigned char>( const unsigned char& x ) { return true; }
template<> inline bool is_int<signed short>( const signed short& x ) { return true; }
template<> inline bool is_int<unsigned short>( const unsigned short& x ) { return true; }
template<> inline bool is_int<signed long>( const signed long& x ) { return true; }
template<> inline bool is_int<unsigned long>( const unsigned long& x ) { return true; }
template<> inline bool is_int<signed long long>( const signed long long& x ) { return true; }
template<> inline bool is_int<unsigned long long>( const unsigned long long& x ) { return true; }
#endif
}
#endif