MYST3: Silence GCC warnings suggesting extra parentheses for clarity.

This commit is contained in:
Torbjörn Andersson 2012-01-20 19:39:23 +01:00
parent 6e9d79b011
commit 92367ce211
2 changed files with 9 additions and 9 deletions

View File

@ -504,9 +504,9 @@ void Menu::handleInput(const Common::KeyState &e) {
return;
}
if ((e.ascii >= 'a' && e.ascii <= 'z'
|| e.ascii >= 'A' && e.ascii <= 'Z'
|| e.ascii >= '0' && e.ascii <= '9'
if (((e.ascii >= 'a' && e.ascii <= 'z')
|| (e.ascii >= 'A' && e.ascii <= 'Z')
|| (e.ascii >= '0' && e.ascii <= '9')
|| e.ascii == ' ')
&& (display.size() < 17)) {
display += e.ascii;

View File

@ -658,12 +658,12 @@ void Myst3Engine::addSunSpot(uint16 pitch, uint16 heading, uint16 intensity,
s.pitch = pitch;
s.heading = heading;
s.intensity = intensity * 2.55;
s.color = color & 0xF | 16
* (color & 0xF | 16
* ((color >> 4) & 0xF | 16
* ((color >> 4) & 0xF | 16
* ((color >> 8) & 0xF | 16
* ((color >> 8) & 0xF)))));
s.color = (color & 0xF) | 16
* ((color & 0xF) | 16
* (((color >> 4) & 0xF) | 16
* (((color >> 4) & 0xF) | 16
* (((color >> 8) & 0xF) | 16
* (((color >> 8) & 0xF))))));
s.var = var;
s.variableIntensity = varControlledIntensity;
s.radius = radius;