diff options
| author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-23 19:12:20 +0000 |
|---|---|---|
| committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-23 19:12:20 +0000 |
| commit | 8431ac369b2f12ac376798fb01748f52d327164a (patch) | |
| tree | 383144a0a102038cf5fd1aaf780f9594ffb376f1 /include | |
| parent | 5950b11a0f4903cd07c0068a428f499dd64bdd2b (diff) | |
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
Diffstat (limited to 'include')
| -rw-r--r-- | include/extern.h | 4 | ||||
| -rw-r--r-- | include/services.h | 6 |
2 files changed, 5 insertions, 5 deletions
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<NickAlias *>(na))->nc && !((static_cast<NickAlias *>(na))->status & NS_VERBOTEN) ? (static_cast<NickAlias *>(na))->nc->language : NSDefLanguage)][(index)]) #define getstring2(nc,index) \ - (langtexts[((nc)?((NickCore*)nc)->language:NSDefLanguage)][(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, 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<char *>(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<char *>(NULL))).second; } /** Shrink an Extensible class. @@ -364,7 +364,7 @@ class Extensible std::map<std::string, void *>::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<T *>(iter->second); /* Item found */ return true; } else |
