From 29997015c9be403a0cd9d5163c604271ae790667 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 4 Sep 2010 19:54:22 +0200 Subject: [PATCH] Fixed: Windows compilation problems --- code/nel/include/nel/misc/common.h | 5 ++++- code/nel/include/nel/misc/mutex.h | 2 -- code/nel/include/nel/net/service.h | 5 ----- code/nel/samples/net/udp/receive_task.cpp | 9 ++------- code/nel/src/ligo/stdligo.h | 5 +++++ code/nel/src/misc/stdmisc.h | 5 +++++ code/nel/tools/3d/zviewer/zviewer.cpp | 5 +++++ .../entities_game_service/pvp_manager/pvp_faction.cpp | 1 + .../pvp_faction_reward_manager/totem_base.h | 11 ++++------- code/ryzom/server/src/mirror_service/data_set_ms.cpp | 1 + code/ryzom/server/src/mirror_service/ms_automaton.cpp | 3 +++ 11 files changed, 30 insertions(+), 22 deletions(-) diff --git a/code/nel/include/nel/misc/common.h b/code/nel/include/nel/misc/common.h index 3bb28de18..124f6bdab 100644 --- a/code/nel/include/nel/misc/common.h +++ b/code/nel/include/nel/misc/common.h @@ -33,7 +33,6 @@ #ifdef NL_OS_WINDOWS # include # include -# include #else # include # include @@ -43,6 +42,10 @@ #include "string_common.h" #ifdef NL_OS_WINDOWS + struct nameHICON__; + typedef struct HICON__ *HICON; + struct nameHWND__; + typedef struct HWND__ *HWND; typedef HWND nlWindow; #define EmptyWindow NULL #elif defined(NL_OS_MAC) diff --git a/code/nel/include/nel/misc/mutex.h b/code/nel/include/nel/misc/mutex.h index a9b89d96c..a5cfd2582 100644 --- a/code/nel/include/nel/misc/mutex.h +++ b/code/nel/include/nel/misc/mutex.h @@ -28,8 +28,6 @@ #include #define __forceinline #elif defined(NL_OS_WINDOWS) -# define NOMINMAX -# include # ifdef NL_NO_ASM # include # endif diff --git a/code/nel/include/nel/net/service.h b/code/nel/include/nel/net/service.h index 95a64309b..316a9ce0f 100644 --- a/code/nel/include/nel/net/service.h +++ b/code/nel/include/nel/net/service.h @@ -24,11 +24,6 @@ #include "nel/misc/types_nl.h" -#if defined(NL_OS_WINDOWS) && defined(_WINDOWS) -# define NOMINMAX -# include -#endif - #include "nel/misc/config_file.h" #include "nel/misc/entity_id.h" #include "nel/misc/variable.h" diff --git a/code/nel/samples/net/udp/receive_task.cpp b/code/nel/samples/net/udp/receive_task.cpp index 7d85a25bf..70276180c 100644 --- a/code/nel/samples/net/udp/receive_task.cpp +++ b/code/nel/samples/net/udp/receive_task.cpp @@ -18,13 +18,8 @@ #ifdef NL_OS_WINDOWS - -#if !defined(NL_COMP_VC9) -# if !defined(NL_COMP_VC8) -# include -# endif -#endif - +# define NOMINMAX +# include #elif defined NL_OS_UNIX #include diff --git a/code/nel/src/ligo/stdligo.h b/code/nel/src/ligo/stdligo.h index 01e82a4a3..08f33928c 100644 --- a/code/nel/src/ligo/stdligo.h +++ b/code/nel/src/ligo/stdligo.h @@ -61,3 +61,8 @@ #include "nel/misc/vector.h" #include "nel/misc/rgba.h" #include "nel/misc/file.h" + +#ifdef NL_OS_WINDOWS + #define NOMINMAX + #include +#endif diff --git a/code/nel/src/misc/stdmisc.h b/code/nel/src/misc/stdmisc.h index 12779c364..27c495672 100644 --- a/code/nel/src/misc/stdmisc.h +++ b/code/nel/src/misc/stdmisc.h @@ -49,3 +49,8 @@ #include "nel/misc/stream.h" #include "nel/misc/path.h" #include "nel/misc/string_common.h" + +#ifdef NL_OS_WINDOWS + #define NOMINMAX + #include +#endif diff --git a/code/nel/tools/3d/zviewer/zviewer.cpp b/code/nel/tools/3d/zviewer/zviewer.cpp index ccbdf4b56..420551a3e 100644 --- a/code/nel/tools/3d/zviewer/zviewer.cpp +++ b/code/nel/tools/3d/zviewer/zviewer.cpp @@ -40,6 +40,11 @@ // Tempyoyo. #include +#ifdef NL_OS_WINDOWS + #define NOMINMAX + #include +#endif // NL_OS_WINDOWS + using namespace std; using namespace NLMISC; using namespace NL3D; diff --git a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction.cpp b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction.cpp index 1dfbd0f51..2e0e43ad6 100644 --- a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction.cpp +++ b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction.cpp @@ -27,6 +27,7 @@ #include "nel/misc/variable.h" using namespace std; +using namespace NLMISC; using namespace PHRASE_UTILITIES; CVariable ResPawnPVPInSameRegionForbiden("egs","ResPawnPVPInSameRegionForbiden", "When character dead in PvP Faction, it can't respawn in same same region of it's death", true, 0, true ); diff --git a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/totem_base.h b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/totem_base.h index 8afeabe11..dccddbad6 100644 --- a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/totem_base.h +++ b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/totem_base.h @@ -21,15 +21,12 @@ #include "game_share/effect_families.h" #include "creature_manager/creature.h" -using namespace std; -using namespace NLMISC; - class CSEffect; class CCharacter; class CTotemEffect; class CFileDescription; -extern CVariable TotemBuildTime; +extern NLMISC::CVariable TotemBuildTime; /** * A Totem Base with its effects on faction PVP @@ -46,7 +43,7 @@ public : CTotemBase( std::string const& name ); /// Return all effects a given character gets on this totem - void getTotemEffect( CCharacter* user, vector& outEffects ) const; + void getTotemEffect( CCharacter* user, std::vector& outEffects ) const; /// Start building this totem void startBuilding( CCharacter* builder ); @@ -127,13 +124,13 @@ private : PVP_CLAN::TPVPClan _OwnerFaction; /// Neighbor regions - vector _Neighbours; + std::vector _Neighbours; /// Effect of the totem base EFFECT_FAMILIES::TEffectFamily _TotemEffect; /// Used BotObject - CRefPtr _BotObject; + NLMISC::CRefPtr _BotObject; /// Is the building finished ? True if no totem bool _IsBuildingFinished; diff --git a/code/ryzom/server/src/mirror_service/data_set_ms.cpp b/code/ryzom/server/src/mirror_service/data_set_ms.cpp index 5a36c2fcf..1afc99369 100644 --- a/code/ryzom/server/src/mirror_service/data_set_ms.cpp +++ b/code/ryzom/server/src/mirror_service/data_set_ms.cpp @@ -24,6 +24,7 @@ #include "mirror_service.h" using namespace NLMISC; +using namespace NLNET; using namespace NLGEORGES; using namespace std; diff --git a/code/ryzom/server/src/mirror_service/ms_automaton.cpp b/code/ryzom/server/src/mirror_service/ms_automaton.cpp index 64bf88c93..7eb5ce17f 100644 --- a/code/ryzom/server/src/mirror_service/ms_automaton.cpp +++ b/code/ryzom/server/src/mirror_service/ms_automaton.cpp @@ -72,6 +72,9 @@ #include "mirror_service.h" #include "tick_proxy.h" +using namespace NLMISC; +using namespace NLNET; +using namespace std; extern NLMISC::CLog _QuickLog;