diff options
author | George Hazan <george.hazan@gmail.com> | 2016-08-30 10:41:38 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-08-30 10:41:38 +0000 |
commit | 4fb1591963465fedc7c3fe02559dfa0336261e91 (patch) | |
tree | 821683da578e2bf3894d3a7fa90a9687979daa45 /plugins/NotesAndReminders/src/miscutils.cpp | |
parent | b0b0895234ee50dba6558822ffb7a1577f240e4e (diff) |
Notes & Reminders:
- fix for broken window text;
- more code cleaning;
- version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@17217 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NotesAndReminders/src/miscutils.cpp')
-rw-r--r-- | plugins/NotesAndReminders/src/miscutils.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/NotesAndReminders/src/miscutils.cpp b/plugins/NotesAndReminders/src/miscutils.cpp index 1ebc3fab85..5add0c6e07 100644 --- a/plugins/NotesAndReminders/src/miscutils.cpp +++ b/plugins/NotesAndReminders/src/miscutils.cpp @@ -18,9 +18,9 @@ WORD ConvertControlToHotKey(WORD HK) return R;
}
-void FreeSettingBlob(WORD pSize,void *pbBlob)
+void FreeSettingBlob(WORD pSize, void *pbBlob)
{
- DBVARIANT dbv = {0};
+ DBVARIANT dbv = { 0 };
dbv.type = DBVT_BLOB;
dbv.cpbVal = pSize;
dbv.pbVal = (BYTE*)pbBlob;
@@ -29,9 +29,9 @@ void FreeSettingBlob(WORD pSize,void *pbBlob) void ReadSettingBlob(MCONTACT hContact, char *ModuleName, char *SettingName, WORD *pSize, void **pbBlob)
{
- DBVARIANT dbv = {0};
+ DBVARIANT dbv = { 0 };
dbv.type = DBVT_BLOB;
- if ( db_get(hContact, ModuleName, SettingName, &dbv)) {
+ if (db_get(hContact, ModuleName, SettingName, &dbv)) {
*pSize = 0;
*pbBlob = NULL;
}
@@ -41,12 +41,12 @@ void ReadSettingBlob(MCONTACT hContact, char *ModuleName, char *SettingName, WOR }
}
-void WriteSettingIntArray(MCONTACT hContact,char *ModuleName,char *SettingName,const int *Value, int Size)
+void WriteSettingIntArray(MCONTACT hContact, char *ModuleName, char *SettingName, const int *Value, int Size)
{
db_set_blob(hContact, ModuleName, SettingName, (void*)Value, sizeof(int)*Size);
}
-bool ReadSettingIntArray(MCONTACT hContact,char *ModuleName,char *SettingName,int *Value, int Size)
+bool ReadSettingIntArray(MCONTACT hContact, char *ModuleName, char *SettingName, int *Value, int Size)
{
WORD sz = 4096;
int *pData;
@@ -61,7 +61,7 @@ bool ReadSettingIntArray(MCONTACT hContact,char *ModuleName,char *SettingName,in bResult = true;
}
- FreeSettingBlob(sz,pData);
+ FreeSettingBlob(sz, pData);
return bResult;
}
@@ -75,11 +75,11 @@ void TreeAdd(TREEELEMENT **root, void *Data) }
}
-void TreeAddSorted(TREEELEMENT **root,void *Data,int (*CompareCb)(TREEELEMENT*,TREEELEMENT*))
+void TreeAddSorted(TREEELEMENT **root, void *Data, int(*CompareCb)(TREEELEMENT*, TREEELEMENT*))
{
if (!*root) {
// list empty, just add normally
- TreeAdd(root,Data);
+ TreeAdd(root, Data);
return;
}
@@ -117,7 +117,7 @@ void TreeAddSorted(TREEELEMENT **root,void *Data,int (*CompareCb)(TREEELEMENT*,T Prev->next = NTE;
}
-void TreeDelete(TREEELEMENT **root,void *iItem)
+void TreeDelete(TREEELEMENT **root, void *iItem)
{
TREEELEMENT *TTE = *root, *Prev = NULL;
if (!TTE)
@@ -130,7 +130,7 @@ void TreeDelete(TREEELEMENT **root,void *iItem) if (TTE) {
if (Prev)
Prev->next = TTE->next;
- else
+ else
*root = (TREEELEMENT*)TTE->next;
SAFE_FREE((void**)&TTE);
}
@@ -154,7 +154,7 @@ int TreeGetCount(TREEELEMENT *root) {
if (!root)
return 0;
-
+
int i = 0;
TREEELEMENT *TTE = root;
while (TTE) {
|