mirror of https://github.com/stella-emu/stella.git
Fix stringToInt in a few places.
This commit is contained in:
parent
5273986e88
commit
737cf7b3b7
|
@ -51,7 +51,7 @@ Int32 HighScoreManager::numVariations()
|
|||
Properties props;
|
||||
string numVariations = properties(props).get(PropType::Cart_Variations);
|
||||
|
||||
return (numVariations == EmptyString) ? 1 : std::min(stoi(numVariations), 256);
|
||||
return (numVariations == EmptyString) ? 1 : std::min(BSPF::stringToInt(numVariations), 256);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -60,7 +60,7 @@ Int32 HighScoreManager::numPlayers()
|
|||
Properties props;
|
||||
string numPlayers = properties(props).get(PropType::Cart_Players);
|
||||
|
||||
return (numPlayers == EmptyString) ? 1 : std::min(stoi(numPlayers), 4);
|
||||
return (numPlayers == EmptyString) ? 1 : std::min(BSPF::stringToInt(numPlayers), 4);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -194,4 +194,4 @@ Int32 HighScoreManager::score()
|
|||
return scores[std::min(player, Int32(3))];
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue