diff options
Diffstat (limited to 'source/slang/slang-stdlib.cpp')
| -rw-r--r-- | source/slang/slang-stdlib.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang-stdlib.cpp b/source/slang/slang-stdlib.cpp index 3ef510990..f3f8f325e 100644 --- a/source/slang/slang-stdlib.cpp +++ b/source/slang/slang-stdlib.cpp @@ -135,6 +135,10 @@ namespace Slang else return kConversionCost_GeneralConversion; } + else if (fromInfo.tag == BaseType::Bool && toInfo.tag == BaseType::Int) + { + return kConversionCost_BoolToInt; + } // If we are converting from an unsigned integer type to // a signed integer type that is guaranteed to be larger, |
