From: <sv...@ww...> - 2004-06-12 22:15:05
|
Author: mkrose Date: 2004-06-12 15:14:57 -0700 (Sat, 12 Jun 2004) New Revision: 1024 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/Ref.h Log: Don't throw on invalid pointer assignments. Callers must check that the result of an assignments in not null. Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-06-12 20:52:36 UTC (rev 1023) +++ trunk/CSP/SimData/CHANGES.current 2004-06-12 22:14:57 UTC (rev 1024) @@ -1,6 +1,13 @@ Version 0.4.0 (in progress) =========================== +2004-06-12: onsight + * Commented out throw statement for assignment to Ref<> from an + incompatible type. Callers must check that the ref is not null + after assignment. + + * Added isNull() method to Ref. + 2004-16-12: wolverine * added a MemoryWriter class to write out a SimData object to a binary memory buffer. Added a MemoryReader class. Added Modified: trunk/CSP/SimData/Include/SimData/Ref.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Ref.h 2004-06-12 20:52:36 UTC (rev 1023) +++ trunk/CSP/SimData/Include/SimData/Ref.h 2004-06-12 22:14:57 UTC (rev 1024) @@ -248,6 +248,12 @@ inline bool valid() const { return _reference != 0; } + + /** Test for null pointer. + */ + inline bool isNull() const { + return _reference == 0; + } /** Comparison with other simdata pointers. */ @@ -299,7 +305,7 @@ _reference = dynamic_cast<CLASS*>(ptr); if (_reference == 0 && ptr != 0) { SIMDATA_LOG(LOG_ALL, LOG_ERROR, "simdata::Ref() assignment: incompatible types (dynamic cast failed)."); - throw ConversionError(); + //throw ConversionError(); } } |