1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 18:19:43 +01:00

Give static storage duration to radix in ss_toi()

Since the value is a const value that reads from an integer literal, it
should be static so we read it directly from storage instead of copying
it.
This commit is contained in:
Misa 2021-02-07 21:17:57 -08:00 committed by Ethan Lee
parent 09841ef3a5
commit 5de7c180ea

View file

@ -40,7 +40,7 @@ int ss_toi(const std::string& str)
{ {
int retval = 0; int retval = 0;
bool negative = false; bool negative = false;
const int radix = 10; static const int radix = 10;
for (size_t i = 0; i < str.size(); ++i) for (size_t i = 0; i < str.size(); ++i)
{ {