Fix Cycles debug build assert on some platforms, tighten checks to avoid this in the future.

This commit is contained in:
Brecht Van Lommel
2016-06-12 17:12:25 +02:00
parent 055001111e
commit 24d53f79b2
13 changed files with 49 additions and 21 deletions

View File

@@ -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);