Skip to content

Commit dfae647

Browse files
committed
Input: Allow reading values of "no shadow" inputs
1 parent a115a4a commit dfae647

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/scratch/input.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ Value Input::value() const
6363
case Type::Shadow:
6464
return m_primaryValue.value();
6565
case Type::NoShadow:
66-
return Value();
6766
case Type::ObscuredShadow: {
6867
switch (m_primaryValue.type()) {
6968
case InputValue::Type::Variable: {
@@ -85,7 +84,8 @@ Value Input::value() const
8584
default: {
8685
auto block = m_primaryValue.valueBlock();
8786
if (!block) {
88-
std::cout << "warning: attempted to get value of an input shadow obscured by a null block" << std::endl;
87+
if (m_type == Type::ObscuredShadow)
88+
std::cout << "warning: attempted to get value of an input shadow obscured by a null block" << std::endl;
8989
return Value();
9090
}
9191
return block->run();

0 commit comments

Comments
 (0)