Commit d9b931e2 by Daniel Koch

Fix warning in build

glslang/MachineIndependent/SymbolTable.h:892:41: error: comparison of integers of different signs: 'int' and 'const uint32_t' (aka 'const unsigned int') [-Werror,-Wsign-compare] uint64_t level = currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel(); ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~ 1 error generated.
parent e56beaee
...@@ -698,7 +698,7 @@ public: ...@@ -698,7 +698,7 @@ public:
void amendSymbolIdLevel(TSymbol& symbol) void amendSymbolIdLevel(TSymbol& symbol)
{ {
// clamp level to avoid overflow // clamp level to avoid overflow
uint64_t level = currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel(); uint64_t level = (uint32_t)currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel();
uint64_t symbolId = symbol.getUniqueId(); uint64_t symbolId = symbol.getUniqueId();
symbolId &= uniqueIdMask; symbolId &= uniqueIdMask;
symbolId |= (level << LevelFlagBitOffset); symbolId |= (level << LevelFlagBitOffset);
...@@ -889,7 +889,7 @@ public: ...@@ -889,7 +889,7 @@ public:
// Add current level in the high-bits of unique id // Add current level in the high-bits of unique id
void updateUniqueIdLevelFlag() { void updateUniqueIdLevelFlag() {
// clamp level to avoid overflow // clamp level to avoid overflow
uint64_t level = currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel(); uint64_t level = (uint32_t)currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel();
uniqueId &= uniqueIdMask; uniqueId &= uniqueIdMask;
uniqueId |= (level << LevelFlagBitOffset); uniqueId |= (level << LevelFlagBitOffset);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment