From ef1e8de44e6d284ac60a1ab29f05e065d9d73ad2 Mon Sep 17 00:00:00 2001 From: historic_bruno Date: Mon, 27 Feb 2012 23:16:31 +0000 Subject: [PATCH] Removes size_t from shareable types to prevent 32/64-bit errors. Adds unsigned int to shareable types. In the future, use int32/player_id_t for player IDs and uint32/entity_id_t for entity IDs. This was SVN commit r11189. --- .../AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.cpp | 4 ++-- .../AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.h | 6 +++--- source/tools/atlas/GameInterface/Messages.h | 2 +- source/tools/atlas/GameInterface/Shareable.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.cpp index 89943c0621..86388b7579 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2012 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -28,7 +28,7 @@ ObjectSettings::ObjectSettings(Observable >& m_Conn = m_SelectedObjects.RegisterObserver(0, &ObjectSettings::OnSelectionChange, this); } -size_t ObjectSettings::GetPlayerID() const +int ObjectSettings::GetPlayerID() const { return m_PlayerID; } diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.h b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.h index 7866044a3f..e89c56455d 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.h +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2012 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -36,7 +36,7 @@ class ObjectSettings public: ObjectSettings(Observable >& selectedObjects, int view); - size_t GetPlayerID() const; + int GetPlayerID() const; void SetPlayerID(int playerID); void SetView(int view); @@ -61,7 +61,7 @@ private: int m_View; // 0 = gaia, 1..inf = normal players - size_t m_PlayerID; + int m_PlayerID; // Set of user-chosen actor selections, potentially a superset of any single // actor's possible variants (since it doesn't get reset if you select diff --git a/source/tools/atlas/GameInterface/Messages.h b/source/tools/atlas/GameInterface/Messages.h index f507d7ae11..07388ed4e4 100644 --- a/source/tools/atlas/GameInterface/Messages.h +++ b/source/tools/atlas/GameInterface/Messages.h @@ -303,7 +303,7 @@ QUERY(GetObjectsList, #ifndef MESSAGES_SKIP_STRUCTS struct sObjectSettings { - Shareable player; + Shareable player; Shareable > selections; // Some settings are immutable and therefore are ignored (and should be left diff --git a/source/tools/atlas/GameInterface/Shareable.h b/source/tools/atlas/GameInterface/Shareable.h index 2ea00ee224..538191b640 100644 --- a/source/tools/atlas/GameInterface/Shareable.h +++ b/source/tools/atlas/GameInterface/Shareable.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2012 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -92,7 +92,7 @@ public: SHAREABLE_PRIMITIVE(unsigned char); SHAREABLE_PRIMITIVE(int); -SHAREABLE_PRIMITIVE(size_t); +SHAREABLE_PRIMITIVE(unsigned int); SHAREABLE_PRIMITIVE(long); SHAREABLE_PRIMITIVE(bool); SHAREABLE_PRIMITIVE(float);