From 8d1e74202626993f8966ec09731f521f24024a7c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 10 Nov 2013 10:05:24 +0000 Subject: - custom bkstring class removed - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@6852 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SmileyAdd/src/customsmiley.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'plugins/SmileyAdd/src/customsmiley.cpp') diff --git a/plugins/SmileyAdd/src/customsmiley.cpp b/plugins/SmileyAdd/src/customsmiley.cpp index a41920d140..8dd946429d 100644 --- a/plugins/SmileyAdd/src/customsmiley.cpp +++ b/plugins/SmileyAdd/src/customsmiley.cpp @@ -64,7 +64,7 @@ SmileyPackCType* SmileyPackCListType::GetSmileyPack(HANDLE id) } -SmileyCType::SmileyCType(const bkstring& fullpath, const TCHAR* filepath) +SmileyCType::SmileyCType(const CMString& fullpath, const TCHAR* filepath) { LoadFromResource(fullpath, 0); CreateTriggerText(T2A_SM(filepath)); @@ -101,7 +101,7 @@ bool SmileyCType::CreateTriggerText(char* text) bool SmileyPackCType::LoadSmileyDir(TCHAR* dir) { - bkstring dirs = dir; + CMString dirs = dir; dirs += _T("\\*.*"); _tfinddata_t c_file; @@ -111,14 +111,14 @@ bool SmileyPackCType::LoadSmileyDir(TCHAR* dir) do { if (c_file.name[0] != '.') { - bkstring fullpath = dir; + CMString fullpath = dir; fullpath = fullpath + _T("\\") + c_file.name; TCHAR* div = _tcsrchr(c_file.name, '.'); if (div) { *div = 0; SmileyCType *smlc = new SmileyCType(fullpath, c_file.name); - if (smlc->GetTriggerText().empty()) + if (smlc->GetTriggerText().IsEmpty()) delete smlc; else m_SmileyList.insert(smlc); @@ -135,11 +135,11 @@ bool SmileyPackCType::LoadSmileyDir(TCHAR* dir) bool SmileyPackCType::LoadSmiley(TCHAR* path) { - bkstring dirs = path; - bkstring::size_type slash = dirs.find_last_of('\\'); - bkstring::size_type dot = dirs.find_last_of('.'); + CMString dirs = path; + int slash = dirs.ReverseFind('\\'); + int dot = dirs.ReverseFind('.'); - bkstring name = dirs.substr(slash+1, dot - slash - 1); + CMString name = dirs.Mid(slash+1, dot - slash - 1); for (int i=0; i < m_SmileyList.getCount(); i++) { if (m_SmileyList[i].GetTriggerText() == name) { @@ -150,7 +150,7 @@ bool SmileyPackCType::LoadSmiley(TCHAR* path) m_SmileyList.insert(new SmileyCType(dirs, (TCHAR*)name.c_str())); - bkstring empty; + CMString empty; m_SmileyLookup.insert(new SmileyLookup( m_SmileyList[m_SmileyList.getCount()-1].GetTriggerText(), false, m_SmileyList.getCount()-1, empty)); @@ -160,7 +160,7 @@ bool SmileyPackCType::LoadSmiley(TCHAR* path) void SmileyPackCType::AddTriggersToSmileyLookup(void) { - bkstring empty; + CMString empty; for (int dist=0; dist