From 86d8cb7b119ddd2504a1f28a14286108ea444635 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 11 Dec 2012 12:22:41 +0100 Subject: [PATCH] Fixed: Compilation with VC++ 2010 and 2012 --- code/nel/include/nel/misc/smart_ptr.h | 2 +- code/nel/src/3d/fasthls_modifier.cpp | 4 ++-- code/nel/tools/misc/extract_filename/extract_filename.cpp | 2 +- code/ryzom/common/src/game_share/welcome_service_itf.h | 7 +++---- .../ryzom/tools/leveldesign/georges_dll/edit_list_ctrl.cpp | 2 +- .../ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp | 2 +- 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/code/nel/include/nel/misc/smart_ptr.h b/code/nel/include/nel/misc/smart_ptr.h index f345f7f6c..2bfb57cc3 100644 --- a/code/nel/include/nel/misc/smart_ptr.h +++ b/code/nel/include/nel/misc/smart_ptr.h @@ -352,7 +352,7 @@ public: } }; -#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10) +#if defined(NL_COMP_VC) && NL_COMP_VC_VERSION >= 80 // This operator only purpose is to compare with NULL value template diff --git a/code/nel/src/3d/fasthls_modifier.cpp b/code/nel/src/3d/fasthls_modifier.cpp index 3203587c0..5195ddb5a 100644 --- a/code/nel/src/3d/fasthls_modifier.cpp +++ b/code/nel/src/3d/fasthls_modifier.cpp @@ -109,7 +109,7 @@ CRGBA CFastHLSModifier::convert(uint H, uint L, uint S) return col; } -#if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10) +#if defined(NL_COMP_VC) && NL_COMP_VC_VERSION >= 71 # pragma warning( push ) # pragma warning( disable : 4799 ) #endif @@ -262,7 +262,7 @@ uint16 CFastHLSModifier::applyHLSMod(uint16 colorIn, uint8 dHue, uint dLum, uin #pragma managed(pop) #endif -#if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10) +#if defined(NL_COMP_VC) && NL_COMP_VC_VERSION >= 71 # pragma warning( pop ) #endif diff --git a/code/nel/tools/misc/extract_filename/extract_filename.cpp b/code/nel/tools/misc/extract_filename/extract_filename.cpp index 33a8a7249..7708f9031 100644 --- a/code/nel/tools/misc/extract_filename/extract_filename.cpp +++ b/code/nel/tools/misc/extract_filename/extract_filename.cpp @@ -23,7 +23,7 @@ using namespace NLMISC; #ifdef NL_DEBUG #define INFO nlinfo #else // NL_DEBUG -# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10) +# if defined(NL_COMP_VC) && NL_COMP_VC_VERSION >= 71 # define INFO __noop # else # define INFO 0&& diff --git a/code/ryzom/common/src/game_share/welcome_service_itf.h b/code/ryzom/common/src/game_share/welcome_service_itf.h index fded04c26..410204cd8 100644 --- a/code/ryzom/common/src/game_share/welcome_service_itf.h +++ b/code/ryzom/common/src/game_share/welcome_service_itf.h @@ -6,9 +6,6 @@ #ifndef WELCOME_SERVICE_ITF #define WELCOME_SERVICE_ITF #include "nel/misc/types_nl.h" -#ifdef NL_COMP_VC8 - #include -#endif #include "nel/misc/hierarchical_timer.h" #include "nel/misc/string_conversion.h" #include "nel/net/message.h" @@ -18,7 +15,9 @@ #include "nel/net/module_gateway.h" #include "nel/net/login_cookie.h" - + +#include + namespace WS { diff --git a/code/ryzom/tools/leveldesign/georges_dll/edit_list_ctrl.cpp b/code/ryzom/tools/leveldesign/georges_dll/edit_list_ctrl.cpp index 8e565dd5e..aac663c1f 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/edit_list_ctrl.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/edit_list_ctrl.cpp @@ -52,7 +52,7 @@ bool CEditListCtrl::create (DWORD wStyle, RECT &rect, CWnd *parent, uint dialog_ subRect.top = 0; subRect.right = rect.right-rect.left; subRect.bottom = rect.bottom-rect.top; -#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) +#if defined(NL_COMP_VC) && NL_COMP_VC_VERSION >= 80 if (ListCtrl.CreateEx ( WS_EX_CLIENTEDGE, /*WC_LISTVIEW, "",*/ WS_CHILD|LVS_REPORT, subRect, this, 0)) #else if (ListCtrl.CreateEx ( WS_EX_CLIENTEDGE, WC_LISTVIEW, "", WS_CHILD|LVS_REPORT, subRect, this, 0)) diff --git a/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp b/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp index 9eb467b97..90b742860 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp @@ -54,7 +54,7 @@ bool CFileTreeCtrl::create( const RECT& rect, CWnd* pParentWnd, UINT nID ) if (CWnd::Create (className, "empty", WS_CHILD, rect, pParentWnd, nID )) -#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) +#if defined(NL_COMP_VC) && NL_COMP_VC_VERSION >= 80 if (_TreeCtrl.CreateEx (WS_EX_CLIENTEDGE, /*_T("SysTreeView32"), "",*/ TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS|TVS_EDITLABELS|WS_CHILD|WS_TABSTOP, rect, this, 0)) #else if (_TreeCtrl.CreateEx (WS_EX_CLIENTEDGE, _T("SysTreeView32"), "", TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS|TVS_EDITLABELS|WS_CHILD|WS_TABSTOP, rect, this, 0))