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-07-17 13:38:15 +0300
committerJacques Lucke <jacques@blender.org>2020-07-17 13:38:15 +0300
commit0e3d34e48f5d5ed3845b1858a66008ab87c55af8 (patch)
treef52b983a632e11233662bacb7b469d9b6e4663c2 /source/blender/nodes/NOD_node_tree_multi_function.hh
parent0fcd23a3880f0caf4a683203b486d451991edb2d (diff)
BLI: add StringRefNull.c_str() method
This should be used whenever you rely on the fact, that the returned pointer points to the beginning of a null-terminated array.
Diffstat (limited to 'source/blender/nodes/NOD_node_tree_multi_function.hh')
-rw-r--r--source/blender/nodes/NOD_node_tree_multi_function.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/NOD_node_tree_multi_function.hh b/source/blender/nodes/NOD_node_tree_multi_function.hh
index d40a630c9f2..f7a1fbb114d 100644
--- a/source/blender/nodes/NOD_node_tree_multi_function.hh
+++ b/source/blender/nodes/NOD_node_tree_multi_function.hh
@@ -240,7 +240,7 @@ class MFNetworkBuilderBase {
BLI_STATIC_ASSERT((std::is_base_of_v<fn::MultiFunction, T>), "");
void *buffer = common_.resources.linear_allocator().allocate(sizeof(T), alignof(T));
T *fn = new (buffer) T(std::forward<Args>(args)...);
- common_.resources.add(destruct_ptr<T>(fn), fn->name().data());
+ common_.resources.add(destruct_ptr<T>(fn), fn->name().c_str());
return *fn;
}
};