From 2df3933196fe683a3a38df01885424c50708e4b0 Mon Sep 17 00:00:00 2001 From: Gitea Date: Sun, 4 Oct 2020 20:05:31 +0000 Subject: [PATCH] Makefile.am,cwCommonImpl.h : Implement use of cwWEB --- Makefile.am | 11 +++++++---- cwCommonImpl.h | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index c18ba23..c760610 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/cwCommonImpl.h b/cwCommonImpl.h index 0fb171d..a033b4a 100644 --- a/cwCommonImpl.h +++ b/cwCommonImpl.h @@ -185,7 +185,22 @@ namespace cw assert( is_integral(t) ); return (t % 2) == 0; } + +#if defined(cwWEB) + template< typename T> + bool is_int(const T& x) + { return false; } + template<> inline bool is_int( const signed char& x ) { return true; } + template<> inline bool is_int( const unsigned char& x ) { return true; } + template<> inline bool is_int( const signed short& x ) { return true; } + template<> inline bool is_int( const unsigned short& x ) { return true; } + template<> inline bool is_int( const signed long& x ) { return true; } + template<> inline bool is_int( const unsigned long& x ) { return true; } + template<> inline bool is_int( const signed long long& x ) { return true; } + template<> inline bool is_int( const unsigned long long& x ) { return true; } + +#endif } #endif