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];
|
string executable = av[0];
|
||||||
size_t slash = executable.find_last_of("/\\");
|
size_t slash = executable.find_last_of("/\\");
|
||||||
if(slash != -1)
|
if(slash != string::npos)
|
||||||
executable.erase(0, slash+1);
|
executable.erase(0, slash+1);
|
||||||
executable += "-";
|
executable += "-";
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ void printException(std::ostream& stream,
|
||||||
*w = '?';
|
*w = '?';
|
||||||
std::string what = msg;
|
std::string what = msg;
|
||||||
size_t cut = msg.find_first_of("<>'");
|
size_t cut = msg.find_first_of("<>'");
|
||||||
if(cut != -1)
|
if(cut != std::string::npos)
|
||||||
{
|
{
|
||||||
msg.erase(cut);
|
msg.erase(cut);
|
||||||
msg += "...";
|
msg += "...";
|
||||||
|
|
Loading…
Reference in a new issue