diff options
author | George Hazan <george.hazan@gmail.com> | 2013-11-10 10:05:24 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-11-10 10:05:24 +0000 |
commit | 8d1e74202626993f8966ec09731f521f24024a7c (patch) | |
tree | a1b205b5d34541b1a0da77f6f5faf7654d8fd40e /plugins/SmileyAdd/src/customsmiley.cpp | |
parent | 4d23915ea7824ad36f5ea2acce8adda234c26de1 (diff) |
- custom bkstring class removed
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@6852 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SmileyAdd/src/customsmiley.cpp')
-rw-r--r-- | plugins/SmileyAdd/src/customsmiley.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
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<m_SmileyList.getCount(); dist++) {
SmileyLookup *dats = new SmileyLookup(m_SmileyList[dist].GetTriggerText(), false, dist, empty);
m_SmileyLookup.insert(dats);
|