1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

went through the rest of cppcheck warnings, mostly harmless

This commit is contained in:
Ivan Savenko
2013-11-07 12:48:41 +00:00
parent 71d6b0fea9
commit ee6cdbeffe
39 changed files with 88 additions and 126 deletions

View File

@ -1267,13 +1267,12 @@ void CTextContainer::blitLine(SDL_Surface *to, Rect destRect, std::string what)
}
size_t begin = 0;
size_t end;
std::string delimeters = "{}";
size_t currDelimeter = 0;
do
{
end = what.find_first_of(delimeters[currDelimeter % 2], begin);
size_t end = what.find_first_of(delimeters[currDelimeter % 2], begin);
if (begin != end)
{
std::string toPrint = what.substr(begin, end-1);