Visual Studio 2013 compilation support for Ryzom Server

--HG--
branch : develop
hg/feature/cef3
kaetemi 10 years ago
parent 3ac5c4c5c3
commit 77d17265eb

@ -285,8 +285,7 @@ namespace NLGUI
class CLuaHashMapTraits
{
public:
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
CLuaHashMapTraits()
{}

@ -61,8 +61,7 @@ public:
class CClassIdHashMapTraits
{
public:
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
inline size_t operator() ( const CClassId& classId ) const
{
return ((((uint64)classId >> 32)|0xFFFFFFFF) ^ (((uint64)classId|0xFFFFFFFF) & 0xFFFFFFFF));

@ -575,8 +575,7 @@ public:
// Traits for hash_map using CEntityId
struct CEntityIdHashMapTraits
{
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
CEntityIdHashMapTraits() { }
size_t operator() (const NLMISC::CEntityId &id ) const
{

@ -248,8 +248,7 @@ private :
class CSheetIdHashMapTraits
{
public:
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
inline size_t operator() ( const CSheetId& sheetId ) const
{
return sheetId.asInt() >> 5;

@ -39,8 +39,7 @@ typedef const std::string *TStringId;
// Traits for hash_map using CStringId
struct CStringIdHashMapTraits
{
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
CStringIdHashMapTraits() { }
size_t operator() (const NLMISC::TStringId &stringId) const
{

@ -355,8 +355,7 @@ namespace NLMISC
// Traits for hash_map using CEntityId
struct CUCStringHashMapTraits
{
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
CUCStringHashMapTraits() { }
size_t operator() (const ucstring &id ) const
{

@ -42,8 +42,7 @@ namespace NLSOUND {
template <class Pointer>
struct THashPtr : public std::unary_function<const Pointer &, size_t>
{
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
size_t operator () (const Pointer &ptr) const
{
//CHashSet<uint>::hasher h;

@ -82,8 +82,7 @@ struct CContextMatcher
struct CHash : public std::unary_function<CContextMatcher, size_t>
{
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
size_t operator () (const CContextMatcher &patternMatcher) const
{
return patternMatcher.getHashValue();

@ -98,8 +98,7 @@ struct CClient
struct TInetAddressHash
{
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
inline bool operator() (const NLNET::CInetAddress &x1, const NLNET::CInetAddress &x2) const
{

@ -201,8 +201,7 @@ template<class A>
class CHashPtr
{
public:
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
typedef A *ptrA;
size_t operator() (const ptrA &a) const

@ -281,8 +281,7 @@ public:
// HashMapTraits for NLMISC::TKey
struct CTKeyHashMapTraits
{
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
CTKeyHashMapTraits() { }
size_t operator() (NLMISC::TKey key) const
{

@ -776,16 +776,10 @@ protected:
/// @name NLMISC::CEntityId handling (for gamedev)
//@{
class CHash
struct CHash
{
public:
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
CHash() {}
enum { bucket_size = 4, min_buckets = 8, };
size_t operator () (const CLFECOMMON::TSheetId &id) const { return id; }
inline bool operator() (const CLFECOMMON::TSheetId &id1, const CLFECOMMON::TSheetId &id2) const { return (size_t)id1 < (size_t)id2; }
};

@ -238,8 +238,7 @@ public:
CHashCode() {}
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
size_t operator () ( const TDataSetRow &index ) const { return index.getHashCode(); }

@ -53,8 +53,7 @@ class CDBStringUpdater : public NLMISC::CSingleton<CDBStringUpdater>
// hasher for the identifier
struct THashDBStringLeaf
{
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
size_t operator()(const TBDStringLeaf &stringLeaf) const
{
return ((size_t)stringLeaf.ClientDB>>4) ^ ((size_t)stringLeaf.Node>>4);

@ -50,8 +50,7 @@ extern CGenericXmlMsgHeaderManager GenericMsgManager;
struct CServiceIdHash
{
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
size_t operator () ( const NLNET::TServiceId &sid ) const { return sid.get(); }
};

@ -43,8 +43,7 @@ public:
struct CUint32Hash
{
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
size_t operator () ( const uint32 &i ) const { return i; }
};

@ -91,8 +91,7 @@ private:
struct CHash
{
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
size_t operator () ( const TEntityIndex& index ) const { return index.getIndex(); }
};

@ -114,10 +114,9 @@ private:
typedef std::vector<TClientId> TEntityIndexToClient;
class CIdHash
struct CIdHash
{
public:
enum { bucket_size = 4, min_buckets = 8, };
size_t operator () ( NLMISC::CEntityId id ) const { return (uint32)id.getShortId(); }
};

@ -69,11 +69,9 @@ typedef uint32 TUid;
/**
* CInetAddress hash function
*/
class CInetAddressHashMapTraits
struct CInetAddressHashMapTraits
{
public:
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
inline size_t operator() ( const NLNET::CInetAddress& x ) const
{
//return x.port();

@ -504,7 +504,7 @@ void CWorldPositionManager::triggerSubscribe(NLNET::TServiceId serviceId, const
STOP_IF(IsRingShard,"Illegal use of CWorldPositionManager on ring shard");
if (_PatatSubscribeManager.exist(name))
{
_PatatSubscribeManager.subscribe(serviceId, make_pair<string,uint16>(name, id));
_PatatSubscribeManager.subscribe(serviceId, std::pair<string,uint16>(name, id));
}
}
@ -2113,7 +2113,7 @@ void CWorldPositionManager::movePlayer(CWorldEntity *entity, sint32 x, sint32 y,
{
if (entity->PlayerInfos->DistanceHistory.size() >= 20)
entity->PlayerInfos->DistanceHistory.pop_back();
entity->PlayerInfos->DistanceHistory.push_front(make_pair<CVectorD, uint>(CVectorD(x*0.001, y*0.001, z*0.001), tick));
entity->PlayerInfos->DistanceHistory.push_front(std::pair<CVectorD, uint>(CVectorD(x*0.001, y*0.001, z*0.001), tick));
}
#endif
@ -3227,7 +3227,7 @@ void CWorldPositionManager::visionRequest(sint32 x, sint32 y, sint32 range, vect
if (abs(x - entity->X) < range && abs(y - entity->Y) < range &&
(rrange = sqrt(sqr((x - entity->X)*0.001) + sqr((y - entity->Y)*0.001))) < frange)
{
entities.push_back(make_pair<CEntityId, sint32>(entity->Id, (sint32)(rrange*1000)));
entities.push_back(std::pair<CEntityId, sint32>(entity->Id, (sint32)(rrange * 1000)));
}
}
@ -3240,7 +3240,7 @@ void CWorldPositionManager::visionRequest(sint32 x, sint32 y, sint32 range, vect
if (abs(x - entity->X) < range && abs(y - entity->Y) < range &&
(rrange = sqrt(sqr((x - entity->X)*0.001) + sqr((y - entity->Y)*0.001))) < frange)
{
entities.push_back(make_pair<CEntityId, sint32>(entity->Id, (sint32)(rrange*1000)));
entities.push_back(std::pair<CEntityId, sint32>(entity->Id, (sint32)(rrange * 1000)));
}
}
}

@ -139,8 +139,7 @@ public:
struct CEntityIdHash
{
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
size_t operator () ( const NLMISC::CEntityId &id ) const { return (uint32)id.getShortId(); }
};

@ -1356,7 +1356,7 @@ void CStringManager::mergeEntityWords(CEntityWords& dest, const CEntityWords& so
std::map<std::string, uint32>::const_iterator iti;
for (iti=source._ColumnInfo.begin(); iti!=source._ColumnInfo.end(); ++iti)
if (dest._ColumnInfo.find((*iti).first) == dest._ColumnInfo.end())
extraColumns.push_back(std::make_pair<std::string, uint32>((*iti).first, osz+(uint32)extraColumns.size()));
extraColumns.push_back(std::pair<std::string, uint32>((*iti).first, osz + (uint32)extraColumns.size()));
for (iti=source._RowInfo.begin(); iti!=source._RowInfo.end(); ++iti)
if (dest._RowInfo.find((*iti).first) == dest._RowInfo.end())

@ -273,7 +273,7 @@ void CMonitorClient::update ()
TYPE_NAME_STRING_ID id = Str[i];
std::map<TYPE_NAME_STRING_ID, std::string>::iterator ite = StringMap.find (id);
nlassert (ite != StringMap.end());
strToSend.push_back( make_pair<TYPE_NAME_STRING_ID, string*>(id, &((*ite).second)) );
strToSend.push_back(std::pair<TYPE_NAME_STRING_ID, string*>(id, &((*ite).second)));
strTotalSize += 4+4+(uint)(*ite).second.size();
}

@ -490,8 +490,7 @@ typedef std::vector<CObjectIndex> TIndexList;
struct CColumnIndexHashMapTraits
{
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
enum { bucket_size = 4, min_buckets = 8, };
CColumnIndexHashMapTraits() { }
size_t operator() (const CColumnIndex &id) const
{

Loading…
Cancel
Save