From 3dee27db7b75a20c099d54f2056a40e46abfe256 Mon Sep 17 00:00:00 2001 From: Dav999-v <44736680+Dav999-v@users.noreply.github.com> Date: Fri, 24 Jan 2020 19:25:21 +0000 Subject: [PATCH] Remove superfluous whitespace in entity XML data in level files (#119) An earlier change caused TinyXml to prettyprint specifically the contents of entities (script names and roomtext) a bit more than before in level files, and added an unusually high amount of whitespace (particularly, it added an empty line to every entity). This happens because, for some reason, an empty string is explicitly being added when creating an entity XML element. The line is so mysterious it feels like it probably somehow solved a nasty bug long ago and shouldn't be touched, but it was probably just a mistake, and with all that whitespace it doesn't look good. --- desktop_version/src/editor.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp index 4be20b40..edcb3404 100644 --- a/desktop_version/src/editor.cpp +++ b/desktop_version/src/editor.cpp @@ -2070,7 +2070,6 @@ void editorclass::save(std::string& _path) edentityElement->SetAttribute( "p5", edentity[i].p5); edentityElement->SetAttribute( "p6", edentity[i].p6); edentityElement->LinkEndChild( new TiXmlText( edentity[i].scriptname.c_str() )) ; - edentityElement->LinkEndChild( new TiXmlText( "" )) ; msg->LinkEndChild( edentityElement ); }