Avoid using non-Standard std::locale::empty() for MSVC
This commit is contained in:
committed by
Chris Hennes
parent
f6eccdc702
commit
be37feffc3
@@ -65,11 +65,7 @@ using namespace std;
|
||||
Base::XMLReader::XMLReader(const char* FileName, std::istream& str)
|
||||
: _File(FileName)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
str.imbue(std::locale::empty());
|
||||
#else
|
||||
str.imbue(std::locale::classic());
|
||||
#endif
|
||||
|
||||
// create the parser
|
||||
parser = XMLReaderFactory::createXMLReader(); // NOLINT
|
||||
|
||||
@@ -318,11 +318,7 @@ void Writer::putNextEntry(const char* file, const char* obj)
|
||||
ZipWriter::ZipWriter(const char* FileName)
|
||||
: ZipStream(FileName)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
ZipStream.imbue(std::locale::empty());
|
||||
#else
|
||||
ZipStream.imbue(std::locale::classic());
|
||||
#endif
|
||||
ZipStream.precision(std::numeric_limits<double>::digits10 + 1);
|
||||
ZipStream.setf(std::ios::fixed, std::ios::floatfield);
|
||||
}
|
||||
@@ -330,11 +326,7 @@ ZipWriter::ZipWriter(const char* FileName)
|
||||
ZipWriter::ZipWriter(std::ostream& os)
|
||||
: ZipStream(os)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
ZipStream.imbue(std::locale::empty());
|
||||
#else
|
||||
ZipStream.imbue(std::locale::classic());
|
||||
#endif
|
||||
ZipStream.precision(std::numeric_limits<double>::digits10 + 1);
|
||||
ZipStream.setf(std::ios::fixed, std::ios::floatfield);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user