From 95336fc1843ab1ca7e2131b66ce67635e0ac19d2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 13 Jul 2014 22:29:27 +0000 Subject: - fix for 64-bit incompatibility; - STL removed; - copyright update; - massive code cleaning; - version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@9790 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/IcqOscarJ/src/icq_fieldnames.cpp | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) (limited to 'protocols/IcqOscarJ/src/icq_fieldnames.cpp') diff --git a/protocols/IcqOscarJ/src/icq_fieldnames.cpp b/protocols/IcqOscarJ/src/icq_fieldnames.cpp index f9fae667cc..d5f80a5732 100644 --- a/protocols/IcqOscarJ/src/icq_fieldnames.cpp +++ b/protocols/IcqOscarJ/src/icq_fieldnames.cpp @@ -6,6 +6,7 @@ // Copyright © 2001-2002 Jon Keating, Richard Hughes // Copyright © 2002-2004 Martin Öberg, Sam Kothari, Robert Rainwater // Copyright © 2004-2009 Joe Kucera +// Copyright © 2012-2014 Miranda NG Team // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -471,7 +472,6 @@ const FieldNamesItem industryField[] = { 0, NULL } }; - const FieldNamesItem occupationField[] = { { 1, LPGEN("Academic") }, @@ -505,7 +505,6 @@ const FieldNamesItem occupationField[] = { 0, NULL } }; - const FieldNamesItem affiliationField[] = { { 200, LPGEN("Alumni Org.") }, @@ -531,7 +530,6 @@ const FieldNamesItem affiliationField[] = { 0, NULL } }; - const FieldNamesItem agesField[] = { { 0x0011000D, LPGEN("13-17") }, @@ -544,7 +542,6 @@ const FieldNamesItem agesField[] = { -1, NULL } }; - const FieldNamesItem maritalField[] = { { 10, LPGEN("Single") }, @@ -559,33 +556,20 @@ const FieldNamesItem maritalField[] = { 0, NULL } }; - -char *LookupFieldName(const FieldNamesItem *table, int code) +char* LookupFieldName(const FieldNamesItem *table, int code) { - int i; - if (code != 0) - { - for(i = 0; table[i].text; i++) - { + for (int i = 0; table[i].text; i++) if (table[i].code == code) return table[i].text; - } - - // Tried to get unexisting field name, you have an - // error in the data or in the table - _ASSERT(FALSE); - } return NULL; } - -char *LookupFieldNameUtf(const FieldNamesItem *table, int code, char *str, size_t strsize) +char* LookupFieldNameUtf(const FieldNamesItem *table, int code, char *str, size_t strsize) { - char *szText = LookupFieldName(table, code); - - if (szText) + char *szText = LookupFieldName(table, code); + if (szText) return ICQTranslateUtfStatic(szText, str, strsize); return NULL; -- cgit v1.2.3