diff options
author | Brad King <brad.king@kitware.com> | 2015-09-02 14:23:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-09-02 14:23:17 (GMT) |
commit | c5cc3441b379e2bc6e70efd6dbd530edebbf0024 (patch) | |
tree | de0c2a39648c936039b7c86886cbe49c04b92923 /Source/kwsys/EncodingCXX.cxx | |
parent | 72c11e590273d100c49f472afc3a7569b233ff00 (diff) | |
parent | 1b79433a6d7cdd1da1a0af74240f2299c78e4112 (diff) | |
download | CMake-c5cc3441b379e2bc6e70efd6dbd530edebbf0024.zip CMake-c5cc3441b379e2bc6e70efd6dbd530edebbf0024.tar.gz CMake-c5cc3441b379e2bc6e70efd6dbd530edebbf0024.tar.bz2 |
Merge branch 'upstream-kwsys' into update-kwsys
Diffstat (limited to 'Source/kwsys/EncodingCXX.cxx')
-rw-r--r-- | Source/kwsys/EncodingCXX.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/kwsys/EncodingCXX.cxx b/Source/kwsys/EncodingCXX.cxx index 251a56d..7d9b3e4 100644 --- a/Source/kwsys/EncodingCXX.cxx +++ b/Source/kwsys/EncodingCXX.cxx @@ -19,7 +19,6 @@ #include "kwsysPrivate.h" #include KWSYS_HEADER(Encoding.hxx) #include KWSYS_HEADER(Encoding.h) -#include KWSYS_HEADER(stl/vector) // Work-around CMake dependency scanning limitation. This must // duplicate the above list of headers. @@ -28,6 +27,7 @@ # include "Encoding.h.in" #endif +#include <vector> #include <stdlib.h> #include <string.h> @@ -140,23 +140,23 @@ char const* const* Encoding::CommandLineArguments::argv() const #if KWSYS_STL_HAS_WSTRING -kwsys_stl::wstring Encoding::ToWide(const kwsys_stl::string& str) +std::wstring Encoding::ToWide(const std::string& str) { return ToWide(str.c_str()); } -kwsys_stl::string Encoding::ToNarrow(const kwsys_stl::wstring& str) +std::string Encoding::ToNarrow(const std::wstring& str) { return ToNarrow(str.c_str()); } -kwsys_stl::wstring Encoding::ToWide(const char* cstr) +std::wstring Encoding::ToWide(const char* cstr) { - kwsys_stl::wstring wstr; + std::wstring wstr; size_t length = kwsysEncoding_mbstowcs(0, cstr, 0) + 1; if(length > 0) { - kwsys_stl::vector<wchar_t> wchars(length); + std::vector<wchar_t> wchars(length); if(kwsysEncoding_mbstowcs(&wchars[0], cstr, length) > 0) { wstr = &wchars[0]; @@ -165,9 +165,9 @@ kwsys_stl::wstring Encoding::ToWide(const char* cstr) return wstr; } -kwsys_stl::string Encoding::ToNarrow(const wchar_t* wcstr) +std::string Encoding::ToNarrow(const wchar_t* wcstr) { - kwsys_stl::string str; + std::string str; size_t length = kwsysEncoding_wcstombs(0, wcstr, 0) + 1; if(length > 0) { |