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:
Diffstat (limited to 'intern/cycles/graph/node_enum.h')
-rw-r--r--intern/cycles/graph/node_enum.h55
1 files changed, 40 insertions, 15 deletions
diff --git a/intern/cycles/graph/node_enum.h b/intern/cycles/graph/node_enum.h
index 705aec9a918..d3ed0928a4f 100644
--- a/intern/cycles/graph/node_enum.h
+++ b/intern/cycles/graph/node_enum.h
@@ -26,25 +26,50 @@ CCL_NAMESPACE_BEGIN
* Utility class for enum values. */
struct NodeEnum {
- bool empty() const { return left.empty(); }
- void insert(const char *x, int y) {
- left[ustring(x)] = y;
- right[y] = ustring(x);
- }
+ bool empty() const
+ {
+ return left.empty();
+ }
+ void insert(const char *x, int y)
+ {
+ left[ustring(x)] = y;
+ right[y] = ustring(x);
+ }
- bool exists(ustring x) const { return left.find(x) != left.end(); }
- bool exists(int y) const { return right.find(y) != right.end(); }
+ bool exists(ustring x) const
+ {
+ return left.find(x) != left.end();
+ }
+ bool exists(int y) const
+ {
+ return right.find(y) != right.end();
+ }
- int operator[](const char *x) const { return left.find(ustring(x))->second; }
- int operator[](ustring x) const { return left.find(x)->second; }
- ustring operator[](int y) const { return right.find(y)->second; }
+ int operator[](const char *x) const
+ {
+ return left.find(ustring(x))->second;
+ }
+ int operator[](ustring x) const
+ {
+ return left.find(x)->second;
+ }
+ ustring operator[](int y) const
+ {
+ return right.find(y)->second;
+ }
- unordered_map<ustring, int, ustringHash>::const_iterator begin() const { return left.begin(); }
- unordered_map<ustring, int, ustringHash>::const_iterator end() const { return left.end(); }
+ unordered_map<ustring, int, ustringHash>::const_iterator begin() const
+ {
+ return left.begin();
+ }
+ unordered_map<ustring, int, ustringHash>::const_iterator end() const
+ {
+ return left.end();
+ }
-private:
- unordered_map<ustring, int, ustringHash> left;
- unordered_map<int, ustring> right;
+ private:
+ unordered_map<ustring, int, ustringHash> left;
+ unordered_map<int, ustring> right;
};
CCL_NAMESPACE_END