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>2020-12-18 15:26:08 +0300
committerJacques Lucke <jacques@blender.org>2020-12-18 15:28:55 +0300
commit79d6bd9a227f9c07b2a1c3e55d9e06d8b8306f39 (patch)
tree9ef76a3c009e03ef207855f30f108b6d88741274 /source/blender/functions/FN_generic_value_map.hh
parentf43561eae6826eead2e5e78bc8792b3c15dda6ae (diff)
Functions: add generic pointer class for const pointers
This adds a GPointer class, which is mostly the same as GMutablePointer. The main difference is that GPointer references const data, while GMutablePointer references non-const data.
Diffstat (limited to 'source/blender/functions/FN_generic_value_map.hh')
-rw-r--r--source/blender/functions/FN_generic_value_map.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/functions/FN_generic_value_map.hh b/source/blender/functions/FN_generic_value_map.hh
index 2c1b37c0461..a9f2dc8a868 100644
--- a/source/blender/functions/FN_generic_value_map.hh
+++ b/source/blender/functions/FN_generic_value_map.hh
@@ -66,7 +66,7 @@ template<typename Key> class GValueMap {
/* Add a value to the container that is copy constructed from the given value. The caller remains
* responsible for destructing and freeing the given value. */
- template<typename ForwardKey> void add_new_by_copy(ForwardKey &&key, GMutablePointer value)
+ template<typename ForwardKey> void add_new_by_copy(ForwardKey &&key, GPointer value)
{
const CPPType &type = *value.type();
void *buffer = allocator_.allocate(type.size(), type.alignment());