mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Make currentletter a char instead of an std::string
It's only one character... why does it have to be a fully-fledged std::string?
This commit is contained in:
@@ -38,19 +38,19 @@ void scriptclass::tokenize( std::string t )
|
||||
{
|
||||
j = 0;
|
||||
std::string tempword;
|
||||
std::string currentletter;
|
||||
char currentletter;
|
||||
|
||||
for (size_t i = 0; i < t.length(); i++)
|
||||
{
|
||||
currentletter = t.substr(i, 1);
|
||||
if (currentletter == "(" || currentletter == ")" || currentletter == ",")
|
||||
currentletter = t[i];
|
||||
if (currentletter == '(' || currentletter == ')' || currentletter == ',')
|
||||
{
|
||||
words[j] = tempword;
|
||||
std::transform(words[j].begin(), words[j].end(), words[j].begin(), ::tolower);
|
||||
j++;
|
||||
tempword = "";
|
||||
}
|
||||
else if (currentletter == " ")
|
||||
else if (currentletter == ' ')
|
||||
{
|
||||
//don't do anything - i.e. strip out spaces.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user