Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r1965 - trunk/Core/Util


Chronological Thread 
  • From: sparker@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [Manta] r1965 - trunk/Core/Util
  • Date: Thu, 3 Jan 2008 21:07:59 -0700 (MST)

Author: sparker
Date: Thu Jan  3 21:07:57 2008
New Revision: 1965

Modified:
   trunk/Core/Util/SPointer.h
Log:
Fixed thinko in isnull and made detach method work for null pointers.


Modified: trunk/Core/Util/SPointer.h
==============================================================================
--- trunk/Core/Util/SPointer.h  (original)
+++ trunk/Core/Util/SPointer.h  Thu Jan  3 21:07:57 2008
@@ -58,7 +58,7 @@
     void detach()
     {
       if(!ptr)
-        throw NullPointerException(typeid(T));
+        return;
       if(ptr->removeReference() == 0){
         // We had the only copy, increment the refcount and return        
         ptr->addReference();
@@ -69,7 +69,7 @@
     }
     bool isNull()
     {
-      return ptr != 0;
+      return ptr == 0;
     }
     
     inline const T* operator->() const




  • [Manta] r1965 - trunk/Core/Util, sparker, 01/03/2008

Archive powered by MHonArc 2.6.16.

Top of page