No need for a variable to store a value, use it and forget it

To compare the result of a method only with a calculated value, there
is no need for a local variable. Let the compiler create itself the
value in the best place, stack or registry.
wilder-portage
Jaime Torres 15 years ago
parent 7407585c15
commit bfc17f4a94
  1. 3
      src/Screen.cpp

@ -695,8 +695,7 @@ void Screen::displayCharacter(unsigned short c)
}
// ensure current line vector has enough elements
int size = screenLines[cuY].size();
if (size < cuX+w)
if (screenLines[cuY].size() < cuX+w)
{
screenLines[cuY].resize(cuX+w);
}

Loading…
Cancel
Save