Removed the std::wstring conversion

This commit is contained in:
Jesse Beder
2009-08-22 00:25:37 +00:00
parent 81c2e6b6ca
commit 8c33523b15
2 changed files with 0 additions and 18 deletions

View File

@@ -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

View File

@@ -1,6 +1,5 @@
#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
{ {
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;
}
} }