cleaner solution for xml-writing speedup.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4176 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2012-06-04 16:22:35 +00:00
parent 5703a48a43
commit 176d607f7f
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,7 @@
Changes in 1.8 (??.??.2011)
- speedup for xml-writing.
- CFileSystem::removeFileArchive now checking for normalized path
- Fix zip's with passwords on 64-bit systems (thx @ Dr. Gladman for writing the bugfix)

View File

@ -205,8 +205,8 @@ void CXMLWriter::writeText(const wchar_t* text)
if (!File || !text)
return;
core::stringw s(text);
s = L""; // passing text and then resetting it is a (little ackward) way to reserve memory for the string to avoid lots of reallocations below.
core::stringw s;
s.reserve(wcslen(text));
const wchar_t* p = text;
while(*p)