diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /intern/cycles/graph/node_enum.h | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'intern/cycles/graph/node_enum.h')
-rw-r--r-- | intern/cycles/graph/node_enum.h | 55 |
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 |