From: Antoine ELIAS Date: Tue, 12 Jan 2016 09:17:24 +0000 (+0100) Subject: utf: module signal_processing X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=ff9d2b23c6b3e9754b8a9f597cd026261b307c38 utf: module signal_processing Change-Id: Icc6bd1a07db0e39ef1abc0547b6fd0a991894459 --- diff --git a/scilab/modules/signal_processing/sci_gateway/cpp/sci_corr.cpp b/scilab/modules/signal_processing/sci_gateway/cpp/sci_corr.cpp index fe765bb..d8df066 100644 --- a/scilab/modules/signal_processing/sci_gateway/cpp/sci_corr.cpp +++ b/scilab/modules/signal_processing/sci_gateway/cpp/sci_corr.cpp @@ -93,7 +93,7 @@ types::Function::ReturnValue sci_corr(types::typed_list &in, int _iRetCount, typ iTotalSize = (int)in[iPos]->getAs()->get(0); - Signalprocessingfunctions* spFunctionsManager = new Signalprocessingfunctions(L"corr"); + Signalprocessingfunctions* spFunctionsManager = new Signalprocessingfunctions("corr"); Signalprocessing::addSignalprocessingfunctions(spFunctionsManager); //get xmacro diff --git a/scilab/modules/signal_processing/src/cpp/signalprocessingfunctions.cpp b/scilab/modules/signal_processing/src/cpp/signalprocessingfunctions.cpp index 2444f2a..102f6c0 100644 --- a/scilab/modules/signal_processing/src/cpp/signalprocessingfunctions.cpp +++ b/scilab/modules/signal_processing/src/cpp/signalprocessingfunctions.cpp @@ -41,10 +41,10 @@ Signalprocessingfunctions* Signalprocessing::getSignalprocessingfunctions() return m_Signalprocessingfunctions; } -Signalprocessingfunctions::Signalprocessingfunctions(const std::wstring& callerName) +Signalprocessingfunctions::Signalprocessingfunctions(const std::string& callerName) { - m_wstrCaller = callerName; + m_strCaller = callerName; m_pCallDgetx = NULL; m_pCallDgety = NULL; @@ -56,10 +56,10 @@ Signalprocessingfunctions::Signalprocessingfunctions(const std::wstring& callerN m_pStringDgetyStatic = NULL; // init static functions - if (callerName == L"corr") + if (callerName == "corr") { - m_staticFunctionMap[L"corexx"] = (void*)C2F(corexx); - m_staticFunctionMap[L"corexy"] = (void*)C2F(corexy); + m_staticFunctionMap["corexx"] = (void*)C2F(corexx); + m_staticFunctionMap["corexy"] = (void*)C2F(corexy); } } @@ -211,9 +211,8 @@ void Signalprocessingfunctions::callDgety(double* y, int* siz, int* iss) if (out.size() != iRetCount) { - char* pstrName = wide_string_to_UTF8(m_pCallDgety->getName().c_str()); + const char* pstrName = m_pCallDgety->getName().c_str(); sprintf(errorMsg, _("%s: Wrong number of input argument(s): %d expected.\n"), pstrName, iRetCount); - FREE(pstrName); throw ast::InternalError(errorMsg); } @@ -237,17 +236,15 @@ void Signalprocessingfunctions::callDgety(double* y, int* siz, int* iss) if (out[0]->isDouble() == false) { - char* pstrName = wide_string_to_UTF8(m_pCallDgety->getName().c_str()); + const char* pstrName = m_pCallDgety->getName().c_str(); sprintf(errorMsg, _("%s: Wrong type for output argument #%d: Real matrix expected.\n"), pstrName, 1); - FREE(pstrName); throw ast::InternalError(errorMsg); } types::Double* pDblOut = out[0]->getAs(); if (pDblOut->isComplex()) { - char* pstrName = wide_string_to_UTF8(m_pCallDgety->getName().c_str()); + const char* pstrName = m_pCallDgety->getName().c_str(); sprintf(errorMsg, _("%s: Wrong type for output argument #%d: Real matrix expected.\n"), pstrName, 1); - FREE(pstrName); throw ast::InternalError(errorMsg); } @@ -304,9 +301,8 @@ void Signalprocessingfunctions::callDgetx(double* x, int* siz, int* iss) if (out.size() != iRetCount) { - char* pstrName = wide_string_to_UTF8(m_pCallDgetx->getName().c_str()); + const char* pstrName = m_pCallDgetx->getName().c_str(); sprintf(errorMsg, _("%s: Wrong number of input argument(s): %d expected.\n"), pstrName, iRetCount); - FREE(pstrName); throw ast::InternalError(errorMsg); } @@ -330,17 +326,15 @@ void Signalprocessingfunctions::callDgetx(double* x, int* siz, int* iss) if (out[0]->isDouble() == false) { - char* pstrName = wide_string_to_UTF8(m_pCallDgetx->getName().c_str()); + const char* pstrName = m_pCallDgetx->getName().c_str(); sprintf(errorMsg, _("%s: Wrong type for output argument #%d: Real matrix expected.\n"), pstrName, 1); - FREE(pstrName); throw ast::InternalError(errorMsg); } types::Double* pDblOut = out[0]->getAs(); if (pDblOut->isComplex()) { - char* pstrName = wide_string_to_UTF8(m_pCallDgetx->getName().c_str()); + const char* pstrName = m_pCallDgetx->getName().c_str(); sprintf(errorMsg, _("%s: Wrong type for output argument #%d: Real matrix expected.\n"), pstrName, 1); - FREE(pstrName); throw ast::InternalError(errorMsg); } diff --git a/scilab/modules/signal_processing/src/cpp/signalprocessingfunctions.hxx b/scilab/modules/signal_processing/src/cpp/signalprocessingfunctions.hxx index ab012b2..cfcedd8 100644 --- a/scilab/modules/signal_processing/src/cpp/signalprocessingfunctions.hxx +++ b/scilab/modules/signal_processing/src/cpp/signalprocessingfunctions.hxx @@ -45,7 +45,7 @@ class SIGNAL_PROCESSING_IMPEXP Signalprocessingfunctions { public : - Signalprocessingfunctions(const std::wstring& callerName); + Signalprocessingfunctions(const std::string& callerName); ~Signalprocessingfunctions(); void setDgetx(types::Callable*); @@ -66,8 +66,8 @@ public : private : std::vector m_FArgs; - std::map m_staticFunctionMap; - std::wstring m_wstrCaller; + std::map m_staticFunctionMap; + std::string m_strCaller; types::Callable* m_pCallDgetx; types::Callable* m_pCallDgety;