From 4f50c04347030e7cd23c1abf59f947d466b1ebdc Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Sun, 11 Apr 2010 02:52:27 +0000 Subject: [PATCH] Add shared_array to vc8 solution. Fix shared_xxx::operator=. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@669 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/BoostWorkaround/boost/shared_array.hpp | 4 +++- code/BoostWorkaround/boost/shared_ptr.hpp | 3 ++- workspaces/vc8/assimp.vcproj | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/code/BoostWorkaround/boost/shared_array.hpp b/code/BoostWorkaround/boost/shared_array.hpp index 98f62edee..eb6501565 100644 --- a/code/BoostWorkaround/boost/shared_array.hpp +++ b/code/BoostWorkaround/boost/shared_array.hpp @@ -114,11 +114,13 @@ public: shared_array& operator= (const shared_array& r) { if(r == *this) { - return; + return *this; } ctr->decref(ptr); ctr = r.ctr->incref(); ptr = r.ptr; + + return *this; } // automatic destruction of the wrapped object when all diff --git a/code/BoostWorkaround/boost/shared_ptr.hpp b/code/BoostWorkaround/boost/shared_ptr.hpp index 7876948d6..6069ca101 100644 --- a/code/BoostWorkaround/boost/shared_ptr.hpp +++ b/code/BoostWorkaround/boost/shared_ptr.hpp @@ -114,11 +114,12 @@ public: shared_ptr& operator= (const shared_ptr& r) { if(r == *this) { - return; + return *this; } ctr->decref(ptr); ctr = r.ctr->incref(); ptr = r.ptr; + return *this; } // automatic destruction of the wrapped object when all diff --git a/workspaces/vc8/assimp.vcproj b/workspaces/vc8/assimp.vcproj index 08ca4cd74..f5b6d523e 100644 --- a/workspaces/vc8/assimp.vcproj +++ b/workspaces/vc8/assimp.vcproj @@ -3684,6 +3684,10 @@ RelativePath="..\..\code\BoostWorkaround\boost\scoped_ptr.hpp" > + +