Bug Fix - undo

- Fixed bug that didn't properly pop_back off the undo stack.
- Fixed bug that caused an attempt to call taskDifferences when one of
  the tasks was "".
This commit is contained in:
Paul Beckingham 2009-07-01 00:46:15 -04:00
parent 0891d3ea63
commit 569d31da7a
3 changed files with 35 additions and 12 deletions

View file

@ -427,13 +427,22 @@ void spit (const std::string& file, const std::string& contents)
}
////////////////////////////////////////////////////////////////////////////////
void spit (const std::string& file, const std::vector <std::string>& lines)
void spit (
const std::string& file,
const std::vector <std::string>& lines,
bool addNewlines /* = true */)
{
std::ofstream out (file.c_str ());
if (out.good ())
{
foreach (line, lines)
{
out << *line;
if (addNewlines)
out << "\n";
}
out.close ();
}
else