]> git.saurik.com Git - wxWidgets.git/commitdiff
added copy constr
authorRobert Roebling <robert@roebling.de>
Tue, 28 Aug 2007 12:30:56 +0000 (12:30 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 28 Aug 2007 12:30:56 +0000 (12:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/objectdataptr.tex

index 7ff5cc1984ce7b1b758c61f90293713329aa24e7..7414b06526c578bde47bdb8ecd4b51d9699cb048 100644 (file)
@@ -60,6 +60,7 @@ class MyCar
 {
 public:
     MyCar( int price );
+    MyCar( const MyCar& data );
     
     bool operator == ( const MyCar& car ) const;
     bool operator != (const MyCar& car) const { return !(*this == car); }
@@ -82,6 +83,11 @@ MyCar::MyCar( int price )
     m_data.get()->SetPrice( price );
 }
 
+MyCar::MyCar( const MyCar& car )
+{
+    m_data.reset( car.m_data.get() );
+}
+
 bool MyCar::operator == ( const MyCar& car ) const
 {
     if (m_data.get() == car.m_data.get()) return true;