Code Cleanup

- Constify some catches.
This commit is contained in:
Scott Kostyshak 2012-09-02 00:39:20 -04:00 committed by Paul Beckingham
parent 589d8fab5c
commit 7a6cdde571
14 changed files with 19 additions and 19 deletions

View file

@ -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);
}

View file

@ -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;

View file

@ -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";

View file

@ -111,7 +111,7 @@ int CmdShell::execute (std::string&)
context.run ();
}
catch (std::string& error)
catch (const std::string& error)
{
std::cerr << error << "\n";
}

View file

@ -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;