From 5a17c9299e03bebf46169927abdeee34aaf8e854 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 May 2015 10:06:32 +0000 Subject: replace strlen to mir_strlen git-svn-id: http://svn.miranda-ng.org/main/trunk@13747 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp | 4 ++-- plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp | 2 +- plugins/UserInfoEx/src/ex_import/tinystr.cpp | 4 ++-- plugins/UserInfoEx/src/ex_import/tinystr.h | 6 +++--- plugins/UserInfoEx/src/ex_import/tinyxml.cpp | 2 +- plugins/UserInfoEx/src/ex_import/tinyxmlparser.cpp | 8 ++++---- 6 files changed, 13 insertions(+), 13 deletions(-) (limited to 'plugins/UserInfoEx/src/ex_import') diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp index d0f2a7e6f7..f5f1e05bee 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp @@ -161,7 +161,7 @@ BYTE CExImContactBase::fromIni(LPSTR& row) LPSTR p1, p2 = NULL; LPSTR pszUIDValue, pszUIDSetting, pszProto = NULL; LPSTR pszBuf = &row[0]; - size_t cchBuf = strlen(row); + size_t cchBuf = mir_strlen(row); MIR_FREE(_pszProtoOld); MIR_FREE(_pszProto); @@ -207,7 +207,7 @@ BYTE CExImContactBase::fromIni(LPSTR& row) // create valid nickname _pszNick = mir_strdup(pszBuf); - size_t i = strlen(_pszNick)-1; + size_t i = mir_strlen(_pszNick)-1; while (i > 0 && (_pszNick[i] == ' ' || _pszNick[i] == '\t')) { _pszNick[i] = 0; i--; diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp index 803afccde9..f2082b398b 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp @@ -72,7 +72,7 @@ static void InitAlteredPlacesBar() if (!CallService(MS_DB_GETPROFILEPATH, SIZEOF(szProfilePath), (LPARAM)szProfilePath)) { // only add if different from profile path - RegSetValueExA(hkPlacesBar, "Place4", 0, REG_SZ, (PBYTE)szProfilePath, (DWORD)strlen(szProfilePath) + 1); + RegSetValueExA(hkPlacesBar, "Place4", 0, REG_SZ, (PBYTE)szProfilePath, (DWORD)mir_strlen(szProfilePath) + 1); } RegCloseKey(hkPlacesBar); diff --git a/plugins/UserInfoEx/src/ex_import/tinystr.cpp b/plugins/UserInfoEx/src/ex_import/tinystr.cpp index dcab417a21..1041e8f037 100644 --- a/plugins/UserInfoEx/src/ex_import/tinystr.cpp +++ b/plugins/UserInfoEx/src/ex_import/tinystr.cpp @@ -110,7 +110,7 @@ TiXmlString operator + (const TiXmlString & a, const TiXmlString & b) TiXmlString operator + (const TiXmlString & a, const char* b) { TiXmlString tmp; - TiXmlString::size_type b_len = static_cast(strlen(b)); + TiXmlString::size_type b_len = static_cast(mir_strlen(b)); tmp.reserve(a.length() + b_len); tmp += a; tmp.append(b, b_len); @@ -120,7 +120,7 @@ TiXmlString operator + (const TiXmlString & a, const char* b) TiXmlString operator + (const char* a, const TiXmlString & b) { TiXmlString tmp; - TiXmlString::size_type a_len = static_cast(strlen(a)); + TiXmlString::size_type a_len = static_cast(mir_strlen(a)); tmp.reserve(a_len + b.length()); tmp.append(a, a_len); tmp += b; diff --git a/plugins/UserInfoEx/src/ex_import/tinystr.h b/plugins/UserInfoEx/src/ex_import/tinystr.h index bc854c8ac5..9c66f2b7e9 100644 --- a/plugins/UserInfoEx/src/ex_import/tinystr.h +++ b/plugins/UserInfoEx/src/ex_import/tinystr.h @@ -82,7 +82,7 @@ class TiXmlString // TiXmlString constructor, based on a string TIXML_EXPLICIT TiXmlString (const char * copy) { - init(static_cast(strlen(copy))); + init(static_cast(mir_strlen(copy))); memcpy(start(), copy, length()); } @@ -102,7 +102,7 @@ class TiXmlString // = operator TiXmlString& operator = (const char * copy) { - return assign(copy, (size_type)strlen(copy)); + return assign(copy, (size_type)mir_strlen(copy)); } // = operator @@ -115,7 +115,7 @@ class TiXmlString // += operator. Maps to append TiXmlString& operator += (const char * suffix) { - return append(suffix, static_cast(strlen(suffix))); + return append(suffix, static_cast(mir_strlen(suffix))); } // += operator. Maps to append diff --git a/plugins/UserInfoEx/src/ex_import/tinyxml.cpp b/plugins/UserInfoEx/src/ex_import/tinyxml.cpp index 0faa453a14..2c815d536c 100644 --- a/plugins/UserInfoEx/src/ex_import/tinyxml.cpp +++ b/plugins/UserInfoEx/src/ex_import/tinyxml.cpp @@ -114,7 +114,7 @@ void TiXmlBase::PutString(const TIXML_STRING& str, TIXML_STRING* outString) //*ME: warning C4267: convert 'size_t' to 'int' //*ME: Int-Cast to make compiler happy ... - outString->append(buf, (int)strlen(buf)); + outString->append(buf, (int)mir_strlen(buf)); ++i; } else diff --git a/plugins/UserInfoEx/src/ex_import/tinyxmlparser.cpp b/plugins/UserInfoEx/src/ex_import/tinyxmlparser.cpp index 04203f2f7a..40f271cb3e 100644 --- a/plugins/UserInfoEx/src/ex_import/tinyxmlparser.cpp +++ b/plugins/UserInfoEx/src/ex_import/tinyxmlparser.cpp @@ -501,7 +501,7 @@ const char* TiXmlBase::GetEntity(const char* p, char* value, int* length, TiXmlE { if (strncmp(entity[i].str, p, entity[i].strLength) == 0) { - assert(strlen(entity[i].str) == entity[i].strLength); + assert(mir_strlen(entity[i].str) == entity[i].strLength); *value = entity[i].chr; *length = 1; return (p + entity[i].strLength); @@ -616,7 +616,7 @@ const char* TiXmlBase::ReadText( const char* p, } } } - return p + strlen(endTag); + return p + mir_strlen(endTag); } #ifdef TIXML_USE_STL @@ -1315,7 +1315,7 @@ const char* TiXmlComment::Parse(const char* p, TiXmlParsingData* data, TiXmlEnco document->SetError(TIXML_ERROR_PARSING_COMMENT, p, data, encoding); return 0; } - p += strlen(startTag); + p += mir_strlen(startTag); p = ReadText(p, &value, false, endTag, false, encoding); return p; } @@ -1467,7 +1467,7 @@ const char* TiXmlText::Parse(const char* p, TiXmlParsingData* data, TiXmlEncodin document->SetError(TIXML_ERROR_PARSING_CDATA, p, data, encoding); return 0; } - p += strlen(startTag); + p += mir_strlen(startTag); // Keep all the white space, ignore the encoding, etc. while ( p && *p -- cgit v1.2.3