Deactivate writing unicode XML until irrlicht devs fix thing son their side

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7214 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2011-01-02 19:02:31 +00:00
parent d78a1c0700
commit f196a544a2

View File

@@ -21,9 +21,50 @@
#include <wchar.h>
#include <string>
#include <stdexcept>
using namespace irr;
// ----------------------------------------------------------------------------
XMLWriter::XMLWriter(const char* dest) : m_base(dest, std::ios::out | std::ios::binary)
{
if (!m_base.is_open())
{
throw std::runtime_error("Failed to open file for writing : " + std::string(dest));
}
}
// ----------------------------------------------------------------------------
XMLWriter& XMLWriter::operator<< (const irr::core::stringw& txt)
{
core::stringc s( txt.c_str() );
m_base.write((char *) s.c_str(), s.size());
return *this;
}
// ----------------------------------------------------------------------------
XMLWriter& XMLWriter::operator<< (const wchar_t*txt)
{
core::stringc s( txt );
m_base.write((char *) s.c_str(), s.size());
return *this;
}
// ----------------------------------------------------------------------------
void XMLWriter::close()
{
m_base.close();
}
// ----------------------------------------------------------------------------
// UNICODE version below, deactivated until irrlicht devs fix their XML reading bug...
#if 0
// ----------------------------------------------------------------------------
XMLWriter::XMLWriter(const char* dest) : m_base(dest, std::ios::out | std::ios::binary)
{
if (!m_base.is_open())
@@ -62,4 +103,4 @@ void XMLWriter::close()
}
// ----------------------------------------------------------------------------
#endif