Skip to content
Snippets Groups Projects
Commit 8b943457 authored by Gerhard Raven's avatar Gerhard Raven
Browse files

Optimize string handling

  - replace 'if (s.substr(a,b) = "ccc")' with 'if (s.compare(a,c,"ccc")==0)'
    which avoids creating a temporary string that is immediately thrown away again
  - used std::stoi(s) instead of ::atoi(s.c_str()), ditto for std::stod
  - replace s.substr(a,s.length()-a) and s.substr(a,s.length()) with s.substr(a)
parent 7e9d454b
No related branches found
No related tags found
2 merge requests!15[WIP] Code Modernization ,!7C++11 modernization changes
Showing
with 44 additions and 52 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment