From 84d64029e525e82e29d2680f29942e81de12412f Mon Sep 17 00:00:00 2001 From: dhewg Date: Thu, 22 Dec 2011 03:02:29 +0100 Subject: [PATCH] New define IDSTR_NO_REDIRECT The defines in idlib/Str.h won't be set to redirect the low level c string functions to idStr when IDSTR_NO_REDIRECT is set. Fixes compilation for MSVC: error C2761: 'Cmp' : member function redeclaration not allowed Reported by spiral. --- idlib/Str.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/idlib/Str.h b/idlib/Str.h index 9b2d103..35d037c 100644 --- a/idlib/Str.h +++ b/idlib/Str.h @@ -40,6 +40,7 @@ If you have questions concerning this license or the applicable additional terms */ // these library functions should not be used for cross platform compatibility +#ifndef IDSTR_NO_REDIRECT #define strcmp idStr::Cmp // use_idStr_Cmp #define strncmp use_idStr_Cmpn @@ -76,6 +77,7 @@ If you have questions concerning this license or the applicable additional terms #define _snprintf use_idStr_snPrintf #define vsnprintf use_idStr_vsnPrintf #define _vsnprintf use_idStr_vsnPrintf +#endif class idVec4;