Commit 8c33523b authored by Jesse Beder's avatar Jesse Beder
Browse files

Removed the std::wstring conversion

parent 81c2e6b6
...@@ -40,9 +40,6 @@ namespace YAML ...@@ -40,9 +40,6 @@ namespace YAML
template <> template <>
bool Converter<_Null>::Convert(const std::string& input, _Null& output); 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 #endif // CONVERSION_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#include "conversion.h" #include "conversion.h"
#include <algorithm> #include <algorithm>
#include <cstdlib>
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
// Specializations for converting a string to specific types // Specializations for converting a string to specific types
...@@ -88,19 +87,5 @@ namespace YAML ...@@ -88,19 +87,5 @@ namespace YAML
{ {
return input.empty() || input == "~" || input == "null" || input == "Null" || input == "NULL"; 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;
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment