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 <mail@jlucke.com>2020-01-03 15:40:31 +0300
committerJacques Lucke <mail@jlucke.com>2020-01-03 15:40:31 +0300
commit35aaf2fe518fbcf8fcef8ca7403ff60c13ef1ae4 (patch)
tree5d23b73822ab4cc0f46fdbcfac1a019fcd893a3a /source/blender/functions/FN_node_tree_multi_function_network.h
parent9c2e7a4e1cd4deb8ead7ed249ed8ad0f26c07f68 (diff)
use IndexToRefMap instead of IndexMap
Diffstat (limited to 'source/blender/functions/FN_node_tree_multi_function_network.h')
-rw-r--r--source/blender/functions/FN_node_tree_multi_function_network.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/functions/FN_node_tree_multi_function_network.h b/source/blender/functions/FN_node_tree_multi_function_network.h
index 206d285384f..fb2519ff866 100644
--- a/source/blender/functions/FN_node_tree_multi_function_network.h
+++ b/source/blender/functions/FN_node_tree_multi_function_network.h
@@ -4,13 +4,13 @@
#include "FN_node_tree.h"
#include "BLI_multi_map.h"
-#include "BLI_index_map.h"
+#include "BLI_index_to_ref_map.h"
#include "FN_multi_function_network.h"
namespace FN {
-using BLI::IndexMap;
+using BLI::IndexToRefMap;
using BLI::MultiMap;
#define IdMultiMap_UNMAPPED UINT_MAX
@@ -80,14 +80,14 @@ class InlinedTreeMFSocketMap {
const FunctionNodeTree *m_function_tree;
const MFNetwork *m_network;
- IndexMap<const MFSocket *> m_dummy_socket_by_fsocket_id;
- IndexMap<const FSocket *> m_fsocket_by_dummy_socket_id;
+ IndexToRefMap<const MFSocket> m_dummy_socket_by_fsocket_id;
+ IndexToRefMap<const FSocket> m_fsocket_by_dummy_socket_id;
public:
InlinedTreeMFSocketMap(const FunctionNodeTree &function_tree,
const MFNetwork &network,
- IndexMap<const MFSocket *> dummy_socket_by_fsocket_id,
- IndexMap<const FSocket *> fsocket_by_dummy_socket_id)
+ IndexToRefMap<const MFSocket> dummy_socket_by_fsocket_id,
+ IndexToRefMap<const FSocket> fsocket_by_dummy_socket_id)
: m_function_tree(&function_tree),
m_network(&network),
m_dummy_socket_by_fsocket_id(std::move(dummy_socket_by_fsocket_id)),
@@ -107,24 +107,24 @@ class InlinedTreeMFSocketMap {
const MFInputSocket &lookup_singly_mapped_input_socket(const FInputSocket &fsocket) const
{
- return m_dummy_socket_by_fsocket_id.lookup(fsocket.id())->as_input();
+ return m_dummy_socket_by_fsocket_id.lookup(fsocket.id()).as_input();
}
const MFOutputSocket &lookup_socket(const FOutputSocket &fsocket) const
{
- return m_dummy_socket_by_fsocket_id.lookup(fsocket.id())->as_output();
+ return m_dummy_socket_by_fsocket_id.lookup(fsocket.id()).as_output();
}
const FInputSocket &lookup_fsocket(const MFInputSocket &socket) const
{
BLI_assert(socket.node().is_dummy());
- return m_fsocket_by_dummy_socket_id.lookup(socket.id())->as_input();
+ return m_fsocket_by_dummy_socket_id.lookup(socket.id()).as_input();
}
const FOutputSocket &lookup_fsocket(const MFOutputSocket &socket) const
{
BLI_assert(socket.node().is_dummy());
- return m_fsocket_by_dummy_socket_id.lookup(socket.id())->as_output();
+ return m_fsocket_by_dummy_socket_id.lookup(socket.id()).as_output();
}
};