mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-30 11:27:19 +02:00
Code Cleanup
- Used the shorter form of std::string::substr that defaults the second argument to std::string::npos.
This commit is contained in:
parent
75e738a9c9
commit
2cf25b7c35
14 changed files with 41 additions and 43 deletions
|
@ -88,7 +88,7 @@ bool Nibbler::getUntil (char c, std::string& result)
|
|||
}
|
||||
else
|
||||
{
|
||||
result = mInput.substr (mCursor, std::string::npos);
|
||||
result = mInput.substr (mCursor);
|
||||
mCursor = mInput.length ();
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ bool Nibbler::getUntil (const std::string& terminator, std::string& result)
|
|||
}
|
||||
else
|
||||
{
|
||||
result = mInput.substr (mCursor, std::string::npos);
|
||||
result = mInput.substr (mCursor);
|
||||
mCursor = mInput.length ();
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ bool Nibbler::getUntilOneOf (const std::string& chars, std::string& result)
|
|||
}
|
||||
else
|
||||
{
|
||||
result = mInput.substr (mCursor, std::string::npos);
|
||||
result = mInput.substr (mCursor);
|
||||
mCursor = mInput.length ();
|
||||
}
|
||||
|
||||
|
@ -284,7 +284,7 @@ bool Nibbler::getUntilEOS (std::string& result)
|
|||
{
|
||||
if (mCursor < mInput.length ())
|
||||
{
|
||||
result = mInput.substr (mCursor, std::string::npos);
|
||||
result = mInput.substr (mCursor);
|
||||
mCursor = mInput.length ();
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue