diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-06-12 18:12:25 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-06-12 18:35:15 +0300 |
commit | 24d53f79b217ff7c62e4c32a49967447a0230fef (patch) | |
tree | bdc956af250dd44e72520f14f1db0c82c258432d /intern/cycles/graph/node.cpp | |
parent | 055001111e226e953b18c31deaacc2e1e7394f78 (diff) |
Fix Cycles debug build assert on some platforms, tighten checks to avoid this in the future.
Diffstat (limited to 'intern/cycles/graph/node.cpp')
-rw-r--r-- | intern/cycles/graph/node.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/intern/cycles/graph/node.cpp b/intern/cycles/graph/node.cpp index 941a66741c5..3c228a716d5 100644 --- a/intern/cycles/graph/node.cpp +++ b/intern/cycles/graph/node.cpp @@ -82,6 +82,12 @@ void Node::set(const SocketType& input, int value) get_socket_value<int>(this, input) = value; } +void Node::set(const SocketType& input, uint value) +{ + assert(input.type == SocketType::UINT); + get_socket_value<uint>(this, input) = value; +} + void Node::set(const SocketType& input, float value) { assert(input.type == SocketType::FLOAT); @@ -198,6 +204,12 @@ int Node::get_int(const SocketType& input) const return get_socket_value<int>(this, input); } +uint Node::get_uint(const SocketType& input) const +{ + assert(input.type == SocketType::UINT); + return get_socket_value<uint>(this, input); +} + float Node::get_float(const SocketType& input) const { assert(input.type == SocketType::FLOAT); |