used unordered_maps
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <string>
|
||||
#include <limits>
|
||||
#include <set>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
@@ -221,4 +222,17 @@ const CompositeProperties defaultCompositeProperties;
|
||||
|
||||
}
|
||||
|
||||
|
||||
namespace std {
|
||||
|
||||
template <> struct hash<llmr::TransitionablePropertyKey> {
|
||||
public:
|
||||
inline size_t operator()(llmr::TransitionablePropertyKey prop) const {
|
||||
typedef typename std::underlying_type<llmr::TransitionablePropertyKey>::type type;
|
||||
return std::hash<type>()(static_cast<type>(prop));
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
std::unordered_map<std::string, TextProperties> texts;
|
||||
std::unordered_map<std::string, RasterProperties> rasters;
|
||||
std::unordered_map<std::string, CompositeProperties> composites;
|
||||
std::map<std::string, std::map<TransitionablePropertyKey, std::string>> effective_classes;
|
||||
std::unordered_map<std::string, std::unordered_map<TransitionablePropertyKey, std::string>> effective_classes;
|
||||
} computed;
|
||||
|
||||
private:
|
||||
@@ -81,7 +81,7 @@ private:
|
||||
std::unordered_map<std::string, TextProperties> texts;
|
||||
std::unordered_map<std::string, RasterProperties> rasters;
|
||||
std::unordered_map<std::string, CompositeProperties> composites;
|
||||
std::map<std::string, std::map<TransitionablePropertyKey, std::string>> effective_classes;
|
||||
std::unordered_map<std::string, std::unordered_map<TransitionablePropertyKey, std::string>> effective_classes;
|
||||
} previous;
|
||||
|
||||
// Settings values currently being transitioned.
|
||||
@@ -95,8 +95,8 @@ private:
|
||||
std::unordered_map<std::string, CompositeProperties> composites;
|
||||
} transitioning;
|
||||
|
||||
std::map<std::string, std::map<TransitionablePropertyKey, PropertyTransition>> properties_to_transition;
|
||||
std::map<std::string, std::map<TransitionablePropertyKey, std::shared_ptr<util::transition>>> transitions;
|
||||
std::unordered_map<std::string, std::unordered_map<TransitionablePropertyKey, PropertyTransition>> properties_to_transition;
|
||||
std::unordered_map<std::string, std::unordered_map<TransitionablePropertyKey, std::shared_ptr<util::transition>>> transitions;
|
||||
uint64_t default_transition_duration = 0;
|
||||
bool initial_render_complete = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user