From b15c46d79518feb7a7027069bb99d6054a185e0f Mon Sep 17 00:00:00 2001 From: rburchell Date: Tue, 10 Feb 2009 13:54:09 +0000 Subject: Move getstring() and getstring2() from macros to functions. This fixes a bunch of warnings, and means they are actually *readable*, as well as type-safe and const. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1975 5417fbe8-f217-4b02-8779-1006273d7864 --- include/extern.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/extern.h b/include/extern.h index 423524a48..124afccff 100644 --- a/include/extern.h +++ b/include/extern.h @@ -533,14 +533,10 @@ E char *langnames[NUM_LANGS]; E int langlist[NUM_LANGS]; E void lang_init(); -#define getstring(na,index) \ - (langtexts[((na) && (static_cast(na))->nc && !((static_cast(na))->status & NS_FORBIDDEN) ? (static_cast(na))->nc->language : NSDefLanguage)][(index)]) -#define getstring2(nc,index) \ - (langtexts[((nc) ? (static_cast(nc))->language : NSDefLanguage)][(index)]) -E int strftime_lang(char *buf, int size, User * u, int format, - struct tm *tm); -E void syntax_error(char *service, User * u, const char *command, - int msgnum); +E int strftime_lang(char *buf, int size, User * u, int format, struct tm *tm); +E void syntax_error(char *service, User * u, const char *command, int msgnum); +E const char *getstring(NickAlias *na, int index); +E const char *getstring2(NickCore *nc, int index); /**** log.c ****/ -- cgit