mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-17 18:12:04 +01:00
find returns npos when not found, not -1. I blame Java for making me think like that.
This commit is contained in:
parent
4a19fdc2e4
commit
4d2ecb80c0
2 changed files with 2 additions and 2 deletions
|
@ -85,7 +85,7 @@ bool TestRunner::run(int ac, const char **av)
|
|||
|
||||
string executable = av[0];
|
||||
size_t slash = executable.find_last_of("/\\");
|
||||
if(slash != -1)
|
||||
if(slash != string::npos)
|
||||
executable.erase(0, slash+1);
|
||||
executable += "-";
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ void printException(std::ostream& stream,
|
|||
*w = '?';
|
||||
std::string what = msg;
|
||||
size_t cut = msg.find_first_of("<>'");
|
||||
if(cut != -1)
|
||||
if(cut != std::string::npos)
|
||||
{
|
||||
msg.erase(cut);
|
||||
msg += "...";
|
||||
|
|
Loading…
Reference in a new issue