summaryrefslogtreecommitdiff
path: root/plugins/SmileyAdd/src/customsmiley.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SmileyAdd/src/customsmiley.cpp')
-rw-r--r--plugins/SmileyAdd/src/customsmiley.cpp20
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);