Added operator<<(const bool&), to get proper true/false written
instead of 0/1 - but it doesn't work yet :(
This commit is contained in:
@@ -19,9 +19,12 @@
|
||||
#ifndef HEADER_UTF_WRITER_HPP
|
||||
#define HEADER_UTF_WRITER_HPP
|
||||
|
||||
#include <fstream>
|
||||
#include "utils/string_utils.hpp"
|
||||
|
||||
#include <irrString.h>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
/**
|
||||
* \brief utility class used to write wide (UTF-16 or UTF-32, depending of size of wchar_t) XML files
|
||||
* \note the inner base class (ofstream) is not public because it will take in any kind of data, and
|
||||
@@ -49,8 +52,13 @@ public:
|
||||
return operator<< (irr::core::stringw(txt.c_str()));
|
||||
} // operator<<(std::string)
|
||||
// ------------------------------------------------------------------------
|
||||
UTFWriter& operator<< (const bool &b)
|
||||
{
|
||||
return operator<<(StringUtils::toString(b));
|
||||
}
|
||||
// ------------------------------------------------------------------------
|
||||
template<typename T>
|
||||
UTFWriter& operator<< (const T t)
|
||||
UTFWriter& operator<< (const T &t)
|
||||
{
|
||||
return operator<<(StringUtils::toString<T>(t));
|
||||
} // operator<< (template)
|
||||
|
||||
Reference in New Issue
Block a user