database: Don't write out unnecessary spaces

When items are deleted from a database we write out a line representing
"invalid entry".  This patch changes the invalid entry line from "0 " to
"0"

Signed-off-by: Anna Schumaker <anna@ocarinaproject.net>
This commit is contained in:
Anna Schumaker 2014-04-09 19:20:12 -04:00
parent 22322a9b12
commit 163d823c19
1 changed files with 4 additions and 2 deletions

View File

@ -28,9 +28,11 @@ void Database<T> :: save()
_file << _db.size() << std::endl;
for (unsigned int i = 0; i < _db.size(); i++) {
_file << _db[i].valid << " ";
if (_db[i].valid == true)
_file << _db[i].valid;
if (_db[i].valid == true) {
_file << " ";
_db[i].write(_file);
}
_file << std::endl;
}