mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Removed the std::wstring conversion
This commit is contained in:
@@ -40,9 +40,6 @@ namespace YAML
|
||||
|
||||
template <>
|
||||
bool Converter<_Null>::Convert(const std::string& input, _Null& output);
|
||||
|
||||
template <>
|
||||
bool Converter<std::wstring>::Convert(const std::string& input, std::wstring& output);
|
||||
}
|
||||
|
||||
#endif // CONVERSION_H_62B23520_7C8E_11DE_8A39_0800200C9A66
|
||||
|
@@ -1,6 +1,5 @@
|
||||
#include "conversion.h"
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Specializations for converting a string to specific types
|
||||
@@ -88,19 +87,5 @@ namespace YAML
|
||||
{
|
||||
return input.empty() || input == "~" || input == "null" || input == "Null" || input == "NULL";
|
||||
}
|
||||
|
||||
template <>
|
||||
bool Converter<std::wstring>::Convert(const std::string& input, std::wstring& output)
|
||||
{
|
||||
output.clear();
|
||||
output.resize(std::mbstowcs(NULL, input.data(), input.size()));
|
||||
std::mbstowcs(
|
||||
(wchar_t *) output.data(),
|
||||
input.data(),
|
||||
input.size()
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user