STYLE: use string substr instead of string::operator()

- makes the purpose clearer.
  In some places, string::resize() is even simpler.

- use C++11 string::back() in preference to str[str.size()-1]
This commit is contained in:
Mark Olesen
2017-07-21 12:30:42 +02:00
parent 72f242405a
commit 8df433860f
26 changed files with 148 additions and 174 deletions

View File

@ -254,7 +254,7 @@ bool merge
if (key[0] == '~')
{
word eraseKey = key(1, key.size()-1);
const word eraseKey = key.substr(1);
if (thisDict.remove(eraseKey))
{
// Mark thisDict entry as having been match for wildcard
@ -325,7 +325,7 @@ bool merge
if (key[0] == '~')
{
word eraseKey = key(1, key.size()-1);
const word eraseKey = key.substr(1);
// List of indices into thisKeys
labelList matches