Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2022-04-25 12:51:22 +0300
committerJacques Lucke <jacques@blender.org>2022-04-25 12:51:34 +0300
commita2d32960b4de78f545ce52e92185eefd3c93fde1 (patch)
treed07f2c21566f223bd62731ee06e78984caaa17f5 /source/blender/blenlib/BLI_generic_virtual_array.hh
parentc63d64a2ce3e49188628d54450b751fd764b8a67 (diff)
BLI: optimize constructing new virtual array
Differential Revision: https://developer.blender.org/D14745
Diffstat (limited to 'source/blender/blenlib/BLI_generic_virtual_array.hh')
-rw-r--r--source/blender/blenlib/BLI_generic_virtual_array.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_generic_virtual_array.hh b/source/blender/blenlib/BLI_generic_virtual_array.hh
index 2e756e912f9..d02760d9178 100644
--- a/source/blender/blenlib/BLI_generic_virtual_array.hh
+++ b/source/blender/blenlib/BLI_generic_virtual_array.hh
@@ -83,7 +83,7 @@ struct GVArrayAnyExtraInfo {
const GVArrayImpl *(*get_varray)(const void *buffer) =
[](const void *UNUSED(buffer)) -> const GVArrayImpl * { return nullptr; };
- template<typename StorageT> static GVArrayAnyExtraInfo get();
+ template<typename StorageT> static constexpr GVArrayAnyExtraInfo get();
};
} // namespace detail
@@ -810,7 +810,7 @@ inline bool GVArrayCommon::is_empty() const
* \{ */
namespace detail {
-template<typename StorageT> inline GVArrayAnyExtraInfo GVArrayAnyExtraInfo::get()
+template<typename StorageT> constexpr GVArrayAnyExtraInfo GVArrayAnyExtraInfo::get()
{
static_assert(std::is_base_of_v<GVArrayImpl, StorageT> ||
is_same_any_v<StorageT, const GVArrayImpl *, std::shared_ptr<const GVArrayImpl>>);