Performance

- Removed "std::endl" in cases where the autoflush is only going to
  slow things down.
This commit is contained in:
Paul Beckingham 2010-10-02 12:02:06 -04:00
parent 1d3aa891d6
commit eb2cb99532
11 changed files with 78 additions and 109 deletions

View file

@ -337,8 +337,7 @@ static std::string importTask_1_4_3 (const std::vector <std::string>& lines)
<< (lines.size () - failed.size () - 1)
<< " tasks successfully, with "
<< failed.size ()
<< " errors."
<< std::endl;
<< " errors.\n";
if (failed.size ())
{
@ -499,8 +498,7 @@ static std::string importTask_1_5_0 (const std::vector <std::string>& lines)
<< (lines.size () - failed.size () - 1)
<< " tasks successfully, with "
<< failed.size ()
<< " errors."
<< std::endl;
<< " errors.\n";
if (failed.size ())
{
@ -662,8 +660,7 @@ static std::string importTask_1_6_0 (const std::vector <std::string>& lines)
<< (lines.size () - failed.size () - 1)
<< " tasks successfully, with "
<< failed.size ()
<< " errors."
<< std::endl;
<< " errors.\n";
if (failed.size ())
{
@ -710,8 +707,7 @@ static std::string importTaskCmdLine (const std::vector <std::string>& lines)
<< (lines.size () - failed.size ())
<< " tasks successfully, with "
<< failed.size ()
<< " errors."
<< std::endl;
<< " errors.\n";
if (failed.size ())
{
@ -839,8 +835,7 @@ static std::string importTodoSh_2_0 (const std::vector <std::string>& lines)
<< (lines.size () - failed.size ())
<< " tasks successfully, with "
<< failed.size ()
<< " errors."
<< std::endl;
<< " errors.\n";
if (failed.size ())
{
@ -903,8 +898,7 @@ static std::string importText (const std::vector <std::string>& lines)
<< count
<< " tasks successfully, with "
<< failed.size ()
<< " errors."
<< std::endl;
<< " errors.\n";
if (failed.size ())
{
@ -1149,8 +1143,7 @@ static std::string importCSV (const std::vector <std::string>& lines)
<< (lines.size () - failed.size () - 1)
<< " tasks successfully, with "
<< failed.size ()
<< " errors."
<< std::endl;
<< " errors.\n";
if (failed.size ())
{
@ -1254,8 +1247,7 @@ static std::string importYAML (const std::vector <std::string>& lines)
std::stringstream out;
out << "Imported "
<< count
<< " tasks successfully."
<< std::endl;
<< " tasks successfully.\n";
return out.str ();
}