From 18e77d606ccf7a858f1cecbd20979104c7e54268 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Sat, 8 Dec 2012 18:18:11 +0400 Subject: [PATCH] Drop functions working with multibyte characters --- modules/core/include/opencv2/core/core.hpp | 7 ----- modules/core/src/persistence.cpp | 30 ---------------------- 2 files changed, 37 deletions(-) diff --git a/modules/core/include/opencv2/core/core.hpp b/modules/core/include/opencv2/core/core.hpp index 60d9d013c..9321aa386 100644 --- a/modules/core/include/opencv2/core/core.hpp +++ b/modules/core/include/opencv2/core/core.hpp @@ -109,13 +109,6 @@ template class CV_EXPORTS MatIterator_; template class CV_EXPORTS MatConstIterator_; template class CV_EXPORTS MatCommaInitializer_; -#if !defined(ANDROID) || (defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_WCHAR_T) -typedef std::basic_string WString; - -CV_EXPORTS string fromUtf16(const WString& str); -CV_EXPORTS WString toUtf16(const string& str); -#endif - CV_EXPORTS string format( const char* fmt, ... ); CV_EXPORTS string tempfile( const char* suffix CV_DEFAULT(0)); diff --git a/modules/core/src/persistence.cpp b/modules/core/src/persistence.cpp index 35f1e9a8e..60d803161 100644 --- a/modules/core/src/persistence.cpp +++ b/modules/core/src/persistence.cpp @@ -45,7 +45,6 @@ #include #include #include -#include #define USE_ZLIB 1 @@ -156,35 +155,6 @@ cv::string cv::FileStorage::getDefaultObjectName(const string& _filename) return cv::string(name); } -namespace cv -{ -#if !defined(ANDROID) || (defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_WCHAR_T) -string fromUtf16(const WString& str) -{ - cv::AutoBuffer _buf(str.size()*4 + 1); - char* buf = _buf; - - size_t sz = wcstombs(buf, str.c_str(), str.size()); - if( sz == (size_t)-1 ) - return string(); - buf[sz] = '\0'; - return string(buf); -} - -WString toUtf16(const string& str) -{ - cv::AutoBuffer _buf(str.size() + 1); - wchar_t* buf = _buf; - - size_t sz = mbstowcs(buf, str.c_str(), str.size()); - if( sz == (size_t)-1 ) - return WString(); - buf[sz] = '\0'; - return WString(buf); -} -#endif -} - typedef struct CvGenericHash { CV_SET_FIELDS()