From: Pyry Haulos Date: Wed, 9 Sep 2015 20:35:53 +0000 (-0700) Subject: Fix build on MSC X-Git-Tag: upstream/2018.6~1511^2~178 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=26b3b00887df09dd79f89e3220c0159ce9128745;p=platform%2Fupstream%2FSPIRV-Tools.git Fix build on MSC Visual C++ compiler doesn't allow ternary select where type depends on condition even if there is a user-defined conversion operator to a common type. --- diff --git a/source/binary.cpp b/source/binary.cpp index 4ce371c..db1330d 100644 --- a/source/binary.cpp +++ b/source/binary.cpp @@ -223,8 +223,11 @@ spv_result_t spvBinaryDecodeOperand( case SPV_OPERAND_TYPE_OPTIONAL_ID: case SPV_OPERAND_TYPE_ID_IN_OPTIONAL_TUPLE: { if (color) { - stream.get() << (type == SPV_OPERAND_TYPE_RESULT_ID ? clr::blue() - : clr::yellow()); + if (type == SPV_OPERAND_TYPE_RESULT_ID) { + stream.get() << clr::blue(); + } else { + stream.get() << clr::yellow(); + } } stream.get() << "%" << spvFixWord(words[index], endian); stream.get() << ((color) ? clr::reset() : "");