The writer now writes less unused blocks, especially for unused DelayedIndexMaps

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1322 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2009-01-09 19:39:22 +00:00
parent 4fde933a11
commit c338444e43
3 changed files with 37 additions and 27 deletions
+6 -1
View File
@@ -59,7 +59,12 @@ void Reader::handle(DelayedIndexMapsData<Key,Value>& d) {
template <typename Key, typename Value>
void Writer::handle(const DelayedIndexMapsData<Key,Value>& d) {
if (!d.unread_data.empty()) {
handle(d.unread_data); // TODO: how to handle filenames
if (d.unread_data == _("\n")) {
// this is not interesting, it is only used to make unread_data nonempty (see above)
// we don't need to write it
} else {
handle(d.unread_data); // TODO: how to handle filenames
}
} else {
handle(d.read_data);
}