summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2020-04-27 20:21:47 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2020-04-27 20:21:47 +0100
commite8a666b37f9ed4f64e6f1c25f07b38d326027b0c (patch)
tree5bef7c69c92315b1678622f27e0e01e86dcbe4cc
parentOnly explicitly instantiate modelparts (diff)
downloadslicer-e8a666b37f9ed4f64e6f1c25f07b38d326027b0c.tar.bz2
slicer-e8a666b37f9ed4f64e6f1c25f07b38d326027b0c.tar.xz
slicer-e8a666b37f9ed4f64e6f1c25f07b38d326027b0c.zip
Remvoe some duplication in class registration
-rw-r--r--slicer/slicer/modelPartsTypes.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/slicer/slicer/modelPartsTypes.cpp b/slicer/slicer/modelPartsTypes.cpp
index faad404..7d9ea54 100644
--- a/slicer/slicer/modelPartsTypes.cpp
+++ b/slicer/slicer/modelPartsTypes.cpp
@@ -5,11 +5,12 @@
namespace Slicer {
using ClassRefMap = std::map<std::string, ClassRef, std::less<>>;
+ using ClassNamePair = std::pair<std::string, std::string>;
using ClassNameMap = boost::multi_index_container<
- std::pair<std::string, std::string>,
+ ClassNamePair,
boost::multi_index::indexed_by<
- boost::multi_index::ordered_unique<boost::multi_index::member<std::pair<std::string, std::string>, const std::string, &std::pair<std::string, std::string>::first>, std::less<>>,
- boost::multi_index::ordered_unique<boost::multi_index::member<std::pair<std::string, std::string>, const std::string, &std::pair<std::string, std::string>::second>, std::less<>>
+ boost::multi_index::ordered_unique<boost::multi_index::member<ClassNamePair, const std::string, &ClassNamePair::first>, std::less<>>,
+ boost::multi_index::ordered_unique<boost::multi_index::member<ClassNamePair, const std::string, &ClassNamePair::second>, std::less<>>
>>;
static void createClassMaps() __attribute__((constructor(208)));