From: <sv...@ww...> - 2004-09-26 20:12:29
|
Author: mkrose Date: 2004-09-26 13:12:20 -0700 (Sun, 26 Sep 2004) New Revision: 1258 Modified: trunk/CSP/SimCore/Battlefield/Battlefield.cpp trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/LogStream.h trunk/CSP/SimData/Include/SimData/TaggedRecord.h Log: Fix a few compiler warnings under msvc. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1258 Modified: trunk/CSP/SimCore/Battlefield/Battlefield.cpp =================================================================== --- trunk/CSP/SimCore/Battlefield/Battlefield.cpp 2004-09-26 14:32:51 UTC (rev 1257) +++ trunk/CSP/SimCore/Battlefield/Battlefield.cpp 2004-09-26 20:12:20 UTC (rev 1258) @@ -75,8 +75,8 @@ bool setAggregationBubbleCount(unsigned count) { CSP_LOG(BATTLEFIELD, DEBUG, "setting aggregation count to " << count << " for " << *unit()); bool state_change = ((count == 0 && m_aggregation_count > 0) || - (count > 0 && m_aggregation_count == 0)); - m_aggregation_count = count; + (count > 0 && m_aggregation_count == 0)); + m_aggregation_count = static_cast<simdata::uint16>(count); return state_change; } Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-09-26 14:32:51 UTC (rev 1257) +++ trunk/CSP/SimData/CHANGES.current 2004-09-26 20:12:20 UTC (rev 1258) @@ -1,6 +1,9 @@ Version 0.4.0 (in progress) =========================== +2004-09-26: onsight + * Fix a couple compiler warnings under msvc. + 2004-09-25: onsight * Add scons build target 'test' which runs the simdata unittests (so far). Modified: trunk/CSP/SimData/Include/SimData/LogStream.h =================================================================== --- trunk/CSP/SimData/Include/SimData/LogStream.h 2004-09-26 14:32:51 UTC (rev 1257) +++ trunk/CSP/SimData/Include/SimData/LogStream.h 2004-09-26 20:12:20 UTC (rev 1258) @@ -66,13 +66,26 @@ #endif // SIMDATA_NOTHREADS public: - /** The default is to send messages to cerr. + + /** Create a new log stream that defaults to stderr. + */ + LogStream(): + m_null(NULL), + m_stream(NULL), + m_fstream(NULL), + m_log_point(true), + m_log_time(false), + m_category(~0), + m_priority(0) { + } + + /** Create a new log stream. * - * @param out_ output stream + * @param out_ The initial output stream. */ LogStream(std::ostream& out_): m_null(NULL), - m_stream(NULL), + m_stream(&out_), m_fstream(NULL), m_log_point(true), m_log_time(false), Modified: trunk/CSP/SimData/Include/SimData/TaggedRecord.h =================================================================== --- trunk/CSP/SimData/Include/SimData/TaggedRecord.h 2004-09-26 14:32:51 UTC (rev 1257) +++ trunk/CSP/SimData/Include/SimData/TaggedRecord.h 2004-09-26 20:12:20 UTC (rev 1258) @@ -224,7 +224,7 @@ _buffer.append(reinterpret_cast<const char*>(&x), sizeof(x)); return *this; } - virtual Writer & operator<<(char const *x) { + virtual Writer & operator<<(char const *) { assert(0); return *this; } @@ -328,7 +328,7 @@ _bytes -= sizeof(x); return *this; } - virtual Reader & operator>>(char * &x) { + virtual Reader & operator>>(char * &) { assert(0); // avoid allocation issues for now -- no char*'s return *this; } |