mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-25 03:07:20 +02:00
Code Cleanup
- Constify some catches.
This commit is contained in:
parent
589d8fab5c
commit
7a6cdde571
14 changed files with 19 additions and 19 deletions
|
@ -319,7 +319,7 @@ void TF2::load_tasks ()
|
|||
_loaded_tasks = true;
|
||||
}
|
||||
|
||||
catch (std::string& e)
|
||||
catch (const std::string& e)
|
||||
{
|
||||
throw e + format (STRING_TDB2_PARSE_ERROR, _file._data, line_number);
|
||||
}
|
||||
|
|
|
@ -811,7 +811,7 @@ ARE_THESE_REALLY_HARMFUL:
|
|||
parseTask (task, after, dateformat);
|
||||
}
|
||||
|
||||
catch (std::string& e)
|
||||
catch (const std::string& e)
|
||||
{
|
||||
problem = e;
|
||||
oops = true;
|
||||
|
|
|
@ -97,7 +97,7 @@ int CmdMerge::execute (std::string& output)
|
|||
{
|
||||
context.tdb2.merge (file);
|
||||
}
|
||||
catch (std::string& e) {
|
||||
catch (const std::string& e) {
|
||||
if (e == STRING_TDB2_UP_TO_DATE)
|
||||
{
|
||||
output += e + "\n";
|
||||
|
|
|
@ -111,7 +111,7 @@ int CmdShell::execute (std::string&)
|
|||
context.run ();
|
||||
}
|
||||
|
||||
catch (std::string& error)
|
||||
catch (const std::string& error)
|
||||
{
|
||||
std::cerr << error << "\n";
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ int main (int argc, const char** argv)
|
|||
status = context.run ();
|
||||
}
|
||||
|
||||
catch (std::string& error)
|
||||
catch (const std::string& error)
|
||||
{
|
||||
std::cerr << error << "\n";
|
||||
status = -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue