diff options
| author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-10 13:54:09 +0000 |
|---|---|---|
| committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-10 13:54:09 +0000 |
| commit | b15c46d79518feb7a7027069bb99d6054a185e0f (patch) | |
| tree | eb52f57972296df2ef9396df47c50e2042f7ddce /include | |
| parent | e7a15723172f46d1f0b192fc959c7a649830173d (diff) | |
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
Diffstat (limited to 'include')
| -rw-r--r-- | include/extern.h | 12 |
1 files changed, 4 insertions, 8 deletions
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<NickAlias *>(na))->nc && !((static_cast<NickAlias *>(na))->status & NS_FORBIDDEN) ? (static_cast<NickAlias *>(na))->nc->language : NSDefLanguage)][(index)]) -#define getstring2(nc,index) \ - (langtexts[((nc) ? (static_cast<NickCore *>(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 ****/ |
