From: <sv...@ww...> - 2005-05-01 15:43:15
|
Author: mkrose Date: 2005-05-01 08:43:07 -0700 (Sun, 01 May 2005) New Revision: 1538 Modified: trunk/CSP/CSPSim/Include/DynamicObject.h trunk/CSP/CSPSim/Source/FlightModel.cpp trunk/CSP/SimCore/Battlefield/test-client.cpp trunk/CSP/SimData/Include/SimData/Referenced.h trunk/CSP/SimData/Source/LogStream.cpp Log: Fix compiler errors under gcc 3.4 targeting x86-64. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1538 Modified: trunk/CSP/CSPSim/Include/DynamicObject.h =================================================================== --- trunk/CSP/CSPSim/Include/DynamicObject.h 2005-05-01 09:13:08 UTC (rev 1537) +++ trunk/CSP/CSPSim/Include/DynamicObject.h 2005-05-01 15:43:07 UTC (rev 1538) @@ -143,8 +143,8 @@ virtual simdata::Vector3 getViewPoint() const; - virtual void onAggregate() { CSP_LOG(APP, INFO, "aggregate @ " << int(this)); } - virtual void onDeaggregate() { CSP_LOG(APP, INFO, "deaggregate @ " << int(this)); } + virtual void onAggregate() { CSP_LOG(APP, INFO, "aggregate @ " << *this); } + virtual void onDeaggregate() { CSP_LOG(APP, INFO, "deaggregate @ " << *this); } bool isNearGround(); Modified: trunk/CSP/CSPSim/Source/FlightModel.cpp =================================================================== --- trunk/CSP/CSPSim/Source/FlightModel.cpp 2005-05-01 09:13:08 UTC (rev 1537) +++ trunk/CSP/CSPSim/Source/FlightModel.cpp 2005-05-01 15:43:07 UTC (rev 1538) @@ -96,10 +96,12 @@ double CL = m_CL - 0.04; //m_CL_md; - //m_CD = m_CD0 + \ - // m_CD_de * fabs(m_Elevator) + \ - // m_CD_db * fabs(m_Airbrake) + \ - // m_CD_i * CL * CL; + /* + m_CD = m_CD0 + \ + m_CD_de * fabs(m_Elevator) + \ + m_CD_db * fabs(m_Airbrake) + \ + m_CD_i * CL * CL; + */ m_CD = m_CD_m_a[m_AirSpeedM][m_Alpha_float] + m_CD_de * fabs(m_Elevator) + \ Modified: trunk/CSP/SimCore/Battlefield/test-client.cpp =================================================================== --- trunk/CSP/SimCore/Battlefield/test-client.cpp 2005-05-01 09:13:08 UTC (rev 1537) +++ trunk/CSP/SimCore/Battlefield/test-client.cpp 2005-05-01 15:43:07 UTC (rev 1538) @@ -69,7 +69,7 @@ }; TestUnitState::Ref Unit::mirror_msg; -SIMDATA_REGISTER_INTERFACE(Unit); +SIMDATA_REGISTER_INTERFACE(Unit) void makeDataArchive() { simdata::Ref<Unit> unit = new Unit; Modified: trunk/CSP/SimData/Include/SimData/Referenced.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Referenced.h 2005-05-01 09:13:08 UTC (rev 1537) +++ trunk/CSP/SimData/Include/SimData/Referenced.h 2005-05-01 15:43:07 UTC (rev 1538) @@ -49,7 +49,7 @@ template <class T> class Ref; class ReferencePointer; -void SIMDATA_EXPORT _log_reference_count_error(int count, int pointer); +void SIMDATA_EXPORT _log_reference_count_error(int count, void* pointer); /** Base class for reference counted objects. @@ -69,7 +69,7 @@ } virtual ~ReferencedBase() { - if (__count != 0) _log_reference_count_error(__count, reinterpret_cast<int>(this)); + if (__count != 0) _log_reference_count_error(__count, reinterpret_cast<void*>(this)); } private: Modified: trunk/CSP/SimData/Source/LogStream.cpp =================================================================== --- trunk/CSP/SimData/Source/LogStream.cpp 2005-05-01 09:13:08 UTC (rev 1537) +++ trunk/CSP/SimData/Source/LogStream.cpp 2005-05-01 15:43:07 UTC (rev 1538) @@ -127,8 +127,8 @@ } // not really the right place for this, but convenient. -void SIMDATA_EXPORT _log_reference_count_error(int count, int pointer) { - SIMDATA_LOG(LOG_ALL, LOG_ERROR, "simdata::ReferencedBase(" << std::hex << pointer << ") deleted with non-zero reference count (" << count << "): memory corruption possible."); +void SIMDATA_EXPORT _log_reference_count_error(int count, void *pointer) { + SIMDATA_LOG(LOG_ALL, LOG_ERROR, "simdata::ReferencedBase(" << pointer << ") deleted with non-zero reference count (" << count << "): memory corruption possible."); } // not really the right place for this, but convenient. |