forked from 0ad/0ad
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.
This commit is contained in:
parent
f52bf1e5fd
commit
ef1e8de44e
@ -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<std::vector<AtlasMessage::ObjectID> >&
|
||||
m_Conn = m_SelectedObjects.RegisterObserver(0, &ObjectSettings::OnSelectionChange, this);
|
||||
}
|
||||
|
||||
size_t ObjectSettings::GetPlayerID() const
|
||||
int ObjectSettings::GetPlayerID() const
|
||||
{
|
||||
return m_PlayerID;
|
||||
}
|
||||
|
@ -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<std::vector<AtlasMessage::ObjectID> >& 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
|
||||
|
@ -303,7 +303,7 @@ QUERY(GetObjectsList,
|
||||
#ifndef MESSAGES_SKIP_STRUCTS
|
||||
struct sObjectSettings
|
||||
{
|
||||
Shareable<size_t> player;
|
||||
Shareable<int> player;
|
||||
Shareable<std::vector<std::wstring> > selections;
|
||||
|
||||
// Some settings are immutable and therefore are ignored (and should be left
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user