diff options
author | George Hazan <george.hazan@gmail.com> | 2013-09-13 19:26:02 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-09-13 19:26:02 +0000 |
commit | eacc63d1fe3c0a5f6b982575867258650f98119b (patch) | |
tree | afe39a5e1764c13293cfd3e8a403a181ea8c3e1f /plugins/Variables/src/parse_miranda.cpp | |
parent | 8aebeeca820d48c4a126bc7670b4a558d73ed881 (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@6056 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Variables/src/parse_miranda.cpp')
-rw-r--r-- | plugins/Variables/src/parse_miranda.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index 88fc767e6c..2e687a1fbf 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -82,7 +82,7 @@ static TCHAR *parseContact(ARGUMENTSINFO *ai) return NULL;
int n = 0;
- if (ai->argc == 4 && *ai->targv[3] != _T('r'))
+ if (ai->argc == 4 && *ai->targv[3] != 'r')
n = ttoi(ai->targv[3]) - 1;
CONTACTSINFO ci = { 0 };
@@ -93,7 +93,7 @@ static TCHAR *parseContact(ARGUMENTSINFO *ai) if (count == 0 || ci.hContacts == NULL)
return NULL;
- if (ai->argc == 4 && *ai->targv[3] == _T('r'))
+ if (ai->argc == 4 && *ai->targv[3] == 'r')
n = rand() % count;
if (count != 1 && ai->argc != 4 ) {
@@ -641,7 +641,7 @@ static TCHAR *parseDbEvent(ARGUMENTSINFO *ai) int flags = DBE_MESSAGE;
switch (*ai->targv[2]) {
- case _T('f'):
+ case 'f':
flags |= DBE_FIRST;
break;
default:
@@ -649,10 +649,10 @@ static TCHAR *parseDbEvent(ARGUMENTSINFO *ai) break;
}
switch (*ai->targv[3]) {
- case _T('s'):
+ case 's':
flags |= DBE_SENT;
break;
- case _T('r'):
+ case 'r':
flags |= DBE_RCVD;
break;
default:
@@ -660,10 +660,10 @@ static TCHAR *parseDbEvent(ARGUMENTSINFO *ai) break;
}
switch (*ai->targv[4]) {
- case _T('r'):
+ case 'r':
flags |= DBE_READ;
break;
- case _T('u'):
+ case 'u':
flags |= DBE_UNREAD;
break;
default:
@@ -689,8 +689,7 @@ static TCHAR *parseDbEvent(ARGUMENTSINFO *ai) if (hDbEvent == NULL)
return NULL;
- DBEVENTINFO dbe = { 0 };
- dbe.cbSize = sizeof(DBEVENTINFO);
+ DBEVENTINFO dbe = { sizeof(dbe) };
dbe.cbBlob = db_event_getBlobSize(hDbEvent);
dbe.pBlob = (PBYTE)mir_calloc(dbe.cbBlob);
if (db_event_get(hDbEvent, &dbe)) {
|