From: <sv...@ww...> - 2004-12-07 08:20:40
|
Author: mkrose Date: 2004-12-07 00:20:33 -0800 (Tue, 07 Dec 2004) New Revision: 1364 Modified: trunk/CSP/SimCore/Battlefield/LocalBattlefield.cpp trunk/CSP/SimData/Include/SimData/Uniform.h Log: Separate 64 bit platform definitions from compiler-specific definitions. Fix more minor warnings... fun, fun. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1364 Modified: trunk/CSP/SimCore/Battlefield/LocalBattlefield.cpp =================================================================== --- trunk/CSP/SimCore/Battlefield/LocalBattlefield.cpp 2004-12-07 05:10:10 UTC (rev 1363) +++ trunk/CSP/SimCore/Battlefield/LocalBattlefield.cpp 2004-12-07 08:20:33 UTC (rev 1364) @@ -747,7 +747,7 @@ const int id = targets[i] & 0xffffff; simnet::NetworkMessage::Ref msg = m_DetailCache[detail].msg; if (msg.valid()) { - m_Connection->send(msg, id); + m_Connection->send(msg, static_cast<PeerId>(id)); } else { CSP_LOG(BATTLEFIELD, ERROR, "no state message"); } @@ -764,7 +764,7 @@ for (unsigned i = 0; i < n; ++i) { if (m_PeerUpdates[i].id == id) { m_PeerUpdates[i].interval = interval_ms; - m_PeerUpdates[i].detail = detail; + m_PeerUpdates[i].detail = static_cast<simdata::uint16>(detail); CSP_LOG(BATTLEFIELD, INFO, "set update interval for peer " << id << " to " << interval_ms << " ms"); return; } Modified: trunk/CSP/SimData/Include/SimData/Uniform.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Uniform.h 2004-12-07 05:10:10 UTC (rev 1363) +++ trunk/CSP/SimData/Include/SimData/Uniform.h 2004-12-07 08:20:33 UTC (rev 1364) @@ -66,15 +66,11 @@ #endif #if defined(_MSC_VER) && (_MSC_VER >= 1310) -# define SIMDATA_STATIC_CONST_DEF(x) -# define SIMDATA_PACKED typedef __int64 int64; typedef unsigned __int64 uint64; # define SIMDATA_ULL(x) x##ull # define SIMDATA_LL(x) x##ll #else -# define SIMDATA_STATIC_CONST_DEF(x) const x -# define SIMDATA_PACKED __attribute__((packed)) // use __extension__ to avoid G++ errors with -pedantic #ifndef SWIG __extension__ @@ -88,6 +84,14 @@ # define SIMDATA_LL(x) x##LL #endif +#if defined(__GNUC__) +# define SIMDATA_STATIC_CONST_DEF(x) const x +# define SIMDATA_PACKED __attribute__((packed)) +#else +# define SIMDATA_STATIC_CONST_DEF(x) +# define SIMDATA_PACKED +#endif + //@} NAMESPACE_SIMDATA_END |