From 9d7b953a12e7d794705336b937b80bc12b65e129 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 30 Nov 2015 10:27:03 +0100 Subject: [PATCH 1/4] Fixed: Warning string after #endif --- code/nel/tools/3d/mesh_utils/scene_meta.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/tools/3d/mesh_utils/scene_meta.h b/code/nel/tools/3d/mesh_utils/scene_meta.h index 62c185ee4..5073e1f88 100644 --- a/code/nel/tools/3d/mesh_utils/scene_meta.h +++ b/code/nel/tools/3d/mesh_utils/scene_meta.h @@ -103,6 +103,6 @@ private: }; -#endif NL_SCENE_META_H +#endif /* NL_SCENE_META_H */ /* end of file */ From 7dbf4bd3d23c477e70fe15d8ccb64203cc1d68b5 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 30 Nov 2015 10:27:41 +0100 Subject: [PATCH 2/4] Fixed: 64 bits constants truncated in 32 bits --- code/nel/include/nel/misc/wang_hash.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/include/nel/misc/wang_hash.h b/code/nel/include/nel/misc/wang_hash.h index b3069b92f..2b51087dd 100644 --- a/code/nel/include/nel/misc/wang_hash.h +++ b/code/nel/include/nel/misc/wang_hash.h @@ -45,7 +45,7 @@ inline uint64 wangHash64Inv(uint64 key) key = key^tmp >> 28; // Invert key *= 21 - key *= 14933078535860113213u; + key *= UINT64_CONSTANT(14933078535860113213); // Invert key = key ^ (key >> 14) tmp = key^key >> 14; @@ -54,7 +54,7 @@ inline uint64 wangHash64Inv(uint64 key) key = key^tmp >> 14; // Invert key *= 265 - key *= 15244667743933553977u; + key *= UINT64_CONSTANT(15244667743933553977); // Invert key = key ^ (key >> 24) tmp = key^key >> 24; From 7ecfbd701a764222548997e1de13a10f7e29b1f4 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 30 Nov 2015 10:28:06 +0100 Subject: [PATCH 3/4] Fixed: VC++ 2010 already supports ULL --- code/nel/include/nel/misc/types_nl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/include/nel/misc/types_nl.h b/code/nel/include/nel/misc/types_nl.h index 3102238bd..9a7d7df76 100644 --- a/code/nel/include/nel/misc/types_nl.h +++ b/code/nel/include/nel/misc/types_nl.h @@ -463,7 +463,7 @@ typedef uint16 ucchar; // To define a 64bits constant; ie: UINT64_CONSTANT(0x123456781234) #ifdef NL_COMP_VC -# if (NL_COMP_VC_VERSION >= 120) +# if (NL_COMP_VC_VERSION >= 100) # define INT64_CONSTANT(c) (c##LL) # define SINT64_CONSTANT(c) (c##LL) # define UINT64_CONSTANT(c) (c##ULL) From d18021f6c9bd171ad5826e77495cbd7963f440b7 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 30 Nov 2015 10:29:24 +0100 Subject: [PATCH 4/4] Fixed: GCC doesn't support no arguments for __VA_ARGS__ --- code/nel/include/nel/misc/tool_logger.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/nel/include/nel/misc/tool_logger.h b/code/nel/include/nel/misc/tool_logger.h index 3ef547045..e3b5c7d17 100644 --- a/code/nel/include/nel/misc/tool_logger.h +++ b/code/nel/include/nel/misc/tool_logger.h @@ -47,13 +47,13 @@ #endif #ifdef NL_DEBUG_H -#define tlerror(toolLogger, path, error, ...) nlwarning(error, __VA_ARGS__), toolLogger.writeError(NLMISC::ERROR, path, error, __VA_ARGS__) -#define tlwarning(toolLogger, path, error, ...) nlwarning(error, __VA_ARGS__), toolLogger.writeError(NLMISC::WARNING, path, error, __VA_ARGS__) -#define tlmessage(toolLogger, path, error, ...) nlinfo(error, __VA_ARGS__), toolLogger.writeError(NLMISC::MESSAGE, path, error, __VA_ARGS__) +#define tlerror(toolLogger, path, error, ...) nlwarning(error, __VA_ARGS__), toolLogger.writeError(NLMISC::ERROR, path, error, ## __VA_ARGS__) +#define tlwarning(toolLogger, path, error, ...) nlwarning(error, __VA_ARGS__), toolLogger.writeError(NLMISC::WARNING, path, error, ## __VA_ARGS__) +#define tlmessage(toolLogger, path, error, ...) nlinfo(error, __VA_ARGS__), toolLogger.writeError(NLMISC::MESSAGE, path, error, ## __VA_ARGS__) #else -#define tlerror(toolLogger, path, error, ...) toolLogger.writeError(NLMISC::ERROR, path, error, __VA_ARGS__) -#define tlwarning(toolLogger, path, error, ...) toolLogger.writeError(NLMISC::WARNING, path, error, __VA_ARGS__) -#define tlmessage(toolLogger, path, error, ...) toolLogger.writeError(NLMISC::MESSAGE, path, error, __VA_ARGS__) +#define tlerror(toolLogger, path, error, ...) toolLogger.writeError(NLMISC::ERROR, path, error, ## __VA_ARGS__) +#define tlwarning(toolLogger, path, error, ...) toolLogger.writeError(NLMISC::WARNING, path, error, ## __VA_ARGS__) +#define tlmessage(toolLogger, path, error, ...) toolLogger.writeError(NLMISC::MESSAGE, path, error, ## __VA_ARGS__) #endif namespace NLMISC {