gsdx tc: avoid any pitfall with 1 << 31

Based on Turtleli feedback
"1 << 31 is undefined in C++11, but defined in C++14"
This commit is contained in:
Gregory Hainaut 2017-01-15 19:55:40 +01:00
parent 87cf7b6d30
commit f9c2025149
1 changed files with 2 additions and 2 deletions

View File

@ -2008,7 +2008,7 @@ void GSTextureCache::SourceMap::Add(Source* s, const GIFRegTEX0& TEX0, GSOffset*
// FIXME: this statement could be optimized to a single ASM instruction (instead of 4)
// Either BTR (AKA bit test and reset). Depends on the previous instruction.
// Or BLSR (AKA Reset Lowest Set Bit). No dependency but require BMI1 (basically a recent CPU)
p ^= 1 << j;
p ^= 1U << j;
m[j].push_front(s);
e[j] = m[j].begin();
@ -2110,7 +2110,7 @@ void GSTextureCache::SourceMap::RemoveAt(Source* s)
// FIXME: this statement could be optimized to a single ASM instruction (instead of 4)
// Either BTR (AKA bit test and reset). Depends on the previous instruction.
// Or BLSR (AKA Reset Lowest Set Bit). No dependency but require BMI1 (basically a recent CPU)
p ^= 1 << j;
p ^= 1U << j;
m[j].erase(e[j]);
}