From 163d823c19cb184c6ab795833ad8acef11cbe6f3 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Wed, 9 Apr 2014 19:20:12 -0400 Subject: [PATCH] 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 --- include/database.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/database.hpp b/include/database.hpp index a8800128..fad06e44 100644 --- a/include/database.hpp +++ b/include/database.hpp @@ -28,9 +28,11 @@ void Database :: 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; }