From 7d281a4f7d354d270fc9c9f3c7a65b4409362aa0 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 28 Jun 2021 13:13:52 +0200 Subject: Functions: improve CPPType * Reduce code duplication. * Give methods more standardized names (e.g. `move_to_initialized` -> `move_assign`). * Support wrapping arbitrary C++ types, even those that e.g. are not copyable. --- source/blender/functions/intern/cpp_types.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'source/blender/functions/intern/cpp_types.cc') diff --git a/source/blender/functions/intern/cpp_types.cc b/source/blender/functions/intern/cpp_types.cc index 9c2c1621e23..7be34d2a1bf 100644 --- a/source/blender/functions/intern/cpp_types.cc +++ b/source/blender/functions/intern/cpp_types.cc @@ -23,20 +23,20 @@ namespace blender::fn { -MAKE_CPP_TYPE(bool, bool) +MAKE_CPP_TYPE(bool, bool, CPPTypeFlags::BasicType) -MAKE_CPP_TYPE(float, float) -MAKE_CPP_TYPE(float2, blender::float2) -MAKE_CPP_TYPE(float3, blender::float3) -MAKE_CPP_TYPE(float4x4, blender::float4x4) +MAKE_CPP_TYPE(float, float, CPPTypeFlags::BasicType) +MAKE_CPP_TYPE(float2, blender::float2, CPPTypeFlags::BasicType) +MAKE_CPP_TYPE(float3, blender::float3, CPPTypeFlags::BasicType) +MAKE_CPP_TYPE(float4x4, blender::float4x4, CPPTypeFlags::BasicType) -MAKE_CPP_TYPE(int32, int32_t) -MAKE_CPP_TYPE(uint32, uint32_t) -MAKE_CPP_TYPE(uint8, uint8_t) +MAKE_CPP_TYPE(int32, int32_t, CPPTypeFlags::BasicType) +MAKE_CPP_TYPE(uint32, uint32_t, CPPTypeFlags::BasicType) +MAKE_CPP_TYPE(uint8, uint8_t, CPPTypeFlags::BasicType) -MAKE_CPP_TYPE(ColorGeometry4f, blender::ColorGeometry4f) -MAKE_CPP_TYPE(ColorGeometry4b, blender::ColorGeometry4b) +MAKE_CPP_TYPE(ColorGeometry4f, blender::ColorGeometry4f, CPPTypeFlags::BasicType) +MAKE_CPP_TYPE(ColorGeometry4b, blender::ColorGeometry4b, CPPTypeFlags::BasicType) -MAKE_CPP_TYPE(string, std::string) +MAKE_CPP_TYPE(string, std::string, CPPTypeFlags::BasicType) } // namespace blender::fn -- cgit v1.2.3