[Bf-blender-cvs] [151c9cd9ff6] functions: make SharedImmutable work with the automatic refcounting

Jacques Lucke noreply at git.blender.org
Fri Mar 8 13:57:36 CET 2019


Commit: 151c9cd9ff612878cae774b549fbe8a5c5ef6f76
Author: Jacques Lucke
Date:   Fri Mar 8 13:56:50 2019 +0100
Branches: functions
https://developer.blender.org/rB151c9cd9ff612878cae774b549fbe8a5c5ef6f76

make SharedImmutable work with the automatic refcounting

===================================================================

M	source/blender/blenlib/BLI_shared_immutable.hpp
M	source/blender/functions/types/lists.hpp

===================================================================

diff --git a/source/blender/blenlib/BLI_shared_immutable.hpp b/source/blender/blenlib/BLI_shared_immutable.hpp
index 14996375ab7..10246e6cf20 100644
--- a/source/blender/blenlib/BLI_shared_immutable.hpp
+++ b/source/blender/blenlib/BLI_shared_immutable.hpp
@@ -8,6 +8,8 @@ namespace BLI {
 	private:
 		SharedImmutable(SharedImmutable &other) = delete;
 
+		template<typename> friend class Shared;
+
 	public:
 		SharedImmutable()
 			: RefCountedBase() {}
diff --git a/source/blender/functions/types/lists.hpp b/source/blender/functions/types/lists.hpp
index 9f33788eabb..38925ea2683 100644
--- a/source/blender/functions/types/lists.hpp
+++ b/source/blender/functions/types/lists.hpp
@@ -73,4 +73,7 @@ namespace FN { namespace Types {
 		}
 	};
 
+	template<typename T>
+	using SharedList = Shared<List<T>>;
+
 } } /* namespace FN::Types */
\ No newline at end of file



More information about the Bf-blender-cvs mailing list