]> git.saurik.com Git - wxWidgets.git/commitdiff
fix bug in the test in STL build (where std::vector uses operator=() and not copy...
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 9 Oct 2008 09:33:13 +0000 (09:33 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 9 Oct 2008 09:33:13 +0000 (09:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56189 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/vectors/vectors.cpp

index 8ebb8b525953f7d3ed48161e98b33442ab18658b..9f7ab2bab9cf899b7275081aaf92ad9494ac9b0d 100644 (file)
@@ -47,7 +47,7 @@ private:
 int CountedObject::ms_count = 0;
 
 // ----------------------------------------------------------------------------
-// simple class capable of checking it's this pointer validity
+// simple class capable of checking its "this" pointer validity
 // ----------------------------------------------------------------------------
 
 class SelfPointingObject
@@ -57,6 +57,10 @@ public:
     SelfPointingObject(const SelfPointingObject&) { m_self = this; }
     ~SelfPointingObject() { CPPUNIT_ASSERT( this == m_self ); }
 
+    // the assignment operator should not modify our "this" pointer so
+    // implement it just to prevent the default version from doing it
+    SelfPointingObject& operator=(const SelfPointingObject&) { return *this; }
+
 private:
     SelfPointingObject *m_self;
 };