From 8431ac369b2f12ac376798fb01748f52d327164a Mon Sep 17 00:00:00 2001 From: cyberbotx Date: Sun, 23 Nov 2008 19:12:20 +0000 Subject: Converted many C-style casts to C++-style casts. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1788 5417fbe8-f217-4b02-8779-1006273d7864 --- include/extern.h | 4 ++-- include/services.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/extern.h b/include/extern.h index 8c050d857..eb29fce8a 100644 --- a/include/extern.h +++ b/include/extern.h @@ -544,9 +544,9 @@ E int langlist[NUM_LANGS]; E void lang_init(void); #define getstring(na,index) \ - (langtexts[((na)&&((NickAlias*)na)->nc&&!(((NickAlias*)na)->status & NS_VERBOTEN)?((NickAlias*)na)->nc->language:NSDefLanguage)][(index)]) + (langtexts[((na) && (static_cast(na))->nc && !((static_cast(na))->status & NS_VERBOTEN) ? (static_cast(na))->nc->language : NSDefLanguage)][(index)]) #define getstring2(nc,index) \ - (langtexts[((nc)?((NickCore*)nc)->language:NSDefLanguage)][(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, diff --git a/include/services.h b/include/services.h index 0d2b98436..7bab47f98 100644 --- a/include/services.h +++ b/include/services.h @@ -320,7 +320,7 @@ class Extensible * the return value is a std::pair of an iterator to the * element, and a bool saying if it was actually inserted. */ - return this->Extension_Items.insert(std::make_pair(key, (char*)p)).second; + return this->Extension_Items.insert(std::make_pair(key, static_cast(p))).second; } /** Extend an Extensible class. @@ -340,7 +340,7 @@ class Extensible * the return value is a std::pair of an iterator to the * element, and a bool saying if it was actually inserted. */ - return this->Extension_Items.insert(std::make_pair(key, (char*)NULL)).second; + return this->Extension_Items.insert(std::make_pair(key, static_cast(NULL))).second; } /** Shrink an Extensible class. @@ -364,7 +364,7 @@ class Extensible std::map::iterator iter = this->Extension_Items.find(key); /* Find the item */ if(iter != this->Extension_Items.end()) { - p = (T*)iter->second; /* Item found */ + p = static_cast(iter->second); /* Item found */ return true; } else -- cgit