]> git.saurik.com Git - wxWidgets.git/commitdiff
Minor correction to smart pointer docs
authorRobert Roebling <robert@roebling.de>
Sun, 25 Jul 2010 19:45:24 +0000 (19:45 +0000)
committerRobert Roebling <robert@roebling.de>
Sun, 25 Jul 2010 19:45:24 +0000 (19:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

interface/wx/scopedptr.h
interface/wx/sharedptr.h
interface/wx/weakref.h

index 1be9abfd853249b80fcc89e3fd64e7a57f1f4f06..8a8d8155202028e70fbec3da887fe99563349205 100644 (file)
@@ -108,22 +108,22 @@ public:
         This operator gets the pointer stored in the smart pointer or returns
         @NULL if there is none.
     */
-    const T* get();
+    T* get() const;
 
     /**
         This operator works like the standard C++ pointer operator to return the object
         being pointed to by the pointer.
 
-        @note
-        If the pointer is @NULL or invalid this will crash.
+        If the internal pointer is @NULL this method will cause an assert in debug mode.
     */
-    const T& operator *();
+    T& operator *() const;
 
     /**
-        This operator works like the standard C++ pointer operator to return the pointer
-        in the smart pointer or @NULL if it is empty.
+        Smart pointer member access. Returns pointer to its object.
+
+        If the internal pointer is @NULL this method will cause an assert in debug mode.
     */
-    const T* operator ->();
+    T* operator ->() const;
 
     /**
         Returns the currently hold pointer and resets the smart pointer object to
@@ -234,15 +234,14 @@ public:
     /**
         Returns a reference to the object.
 
-        @note
-        If the internal pointer is @NULL this method will cause an assert
-        in debug mode.
+        If the internal pointer is @NULL this method will cause an assert in debug mode.
     */
-    T operator*() const;
+    T& operator*() const;
 
     /**
-        Returns pointer to object. If the pointer is @NULL this method will
-        cause an assert in debug mode.
+        Smart pointer member access. Returns pointer to object. 
+        
+        If the internal pointer is @NULL this method will cause an assert in debug mode.
     */
     T* operator->() const;
 
index 2b18e2a4713c95793280a25249e5a7927eb731d9..47b73c0d601b4f200899fd7ee2a80d16c0de125e 100644 (file)
@@ -61,7 +61,9 @@ public:
     T operator*() const;
 
     /**
-        Returns pointer to its object or @NULL.
+        Smart pointer member access. Returns pointer to its object.
+
+        If the internal pointer is @NULL this method will cause an assert in debug mode.
     */
     T* operator->() const;
 
index 17a158f9e772a0ce012ee56ab4fb26622bfdf82c..6e988f0e1276e4415f5d3112f83877e89a820b92 100644 (file)
@@ -156,11 +156,10 @@ public:
     T& operator*() const;
 
     /**
-        Smart pointer member access.
-        Returns a pointer to the tracked object.
+        Smart pointer member access. Returns a pointer to the tracked object.
         If the internal pointer is @NULL this method will cause an assert in debug mode.
     */
-    T* operator-();
+    T* operator->();
 
     /**
         Releases the currently tracked object and starts tracking @e pobj.