From 097c52ad9a2928422084bf76cebee58958341574 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 7 Apr 2013 19:47:13 +0000 Subject: end of the old database macroses git-svn-id: http://svn.miranda-ng.org/main/trunk@4373 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'plugins/Clist_nicer/src') 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 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; } -- cgit v1.2.3