diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-07 19:47:13 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-07 19:47:13 +0000 |
commit | 097c52ad9a2928422084bf76cebee58958341574 (patch) | |
tree | 26d6b11e9738fc4e854f68c0ff04eaadf7d849e8 /plugins/Clist_nicer | |
parent | f096b29abb03618ec609ba4acaedaed43eec1fea (diff) |
end of the old database macroses
git-svn-id: http://svn.miranda-ng.org/main/trunk@4373 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer')
-rw-r--r-- | plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp index e371374fe7..bd14dfc47b 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp @@ -525,20 +525,15 @@ int DBStoreFrameSettingsAtPos(int pos, int Frameid) int LocateStorePosition(int Frameid, int maxstored)
{
- int i;
- LPTSTR frmname;
- char settingname[255];
if (Frames[Frameid].name == NULL) return -1;
- for (i = 0;i < maxstored;i++) {
+ for (int i = 0;i < maxstored;i++) {
+ char settingname[255];
mir_snprintf(settingname, sizeof(settingname), "Name%d", i);
- frmname = DBGetStringT(0, CLUIFrameModule, settingname);
+ mir_ptr<TCHAR> frmname( db_get_tsa(0, CLUIFrameModule, settingname));
if (frmname == NULL) continue;
- if (lstrcmpi(frmname, Frames[Frameid].name) == 0) {
- mir_free(frmname);
+ if (lstrcmpi(frmname, Frames[Frameid].name) == 0)
return i;
- }
- mir_free(frmname);
}
return -1;
}
|