diff options
author | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-06-20 18:42:58 -0400 |
---|---|---|
committer | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-06-20 18:42:58 -0400 |
commit | 381c9c8870fad4c544f29deec22ba4be3549a731 (patch) | |
tree | f5f26e2dd380910b0ddd26e3d885d6bf56d40181 /src/nickcore.cpp | |
parent | 2528dc80bd1b3e6b2c09db23eb51659e30128110 (diff) |
The first of a few "CBX OCDing over code style" commits, focusing on include/* and src/* but not src/core/* or src/modules/*.
Diffstat (limited to 'src/nickcore.cpp')
-rw-r--r-- | src/nickcore.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/nickcore.cpp b/src/nickcore.cpp index cf92b0b3d..9d51422c9 100644 --- a/src/nickcore.cpp +++ b/src/nickcore.cpp @@ -21,7 +21,7 @@ NickCore::NickCore(const std::string &coredisplay) for (size_t t = NI_BEGIN + 1; t != NI_END; ++t) if (Config.NSDefFlags.HasFlag(static_cast<NickCoreFlag>(t))) SetFlag(static_cast<NickCoreFlag>(t)); - + NickCoreList[this->display] = this; } @@ -34,7 +34,7 @@ NickCore::~NickCore() /* Clean up this nick core from any users online using it * (ones that /nick but remain unidentified) */ - for (std::list<User *>::iterator it = this->Users.begin(); it != this->Users.end(); ++it) + for (std::list<User *>::iterator it = this->Users.begin(), it_end = this->Users.end(); it != it_end; ++it) { User *user = *it; ircdproto->SendAccountLogout(user, user->Account()); @@ -64,11 +64,11 @@ NickCore::~NickCore() if (this->greet) delete [] this->greet; if (this->url) - delete [] this->url; + delete [] this->url; if (!this->memos.memos.empty()) { - for (unsigned i = 0; i < this->memos.memos.size(); ++i) + for (unsigned i = 0, end = this->memos.memos.size(); i < end; ++i) { if (this->memos.memos[i]->text) delete [] this->memos.memos[i]->text; @@ -78,7 +78,7 @@ NickCore::~NickCore() } } -bool NickCore::HasCommand(const std::string &cmdstr) const +bool NickCore::HasCommand(const ci::string &cmdstr) const { if (!this->ot) { @@ -97,13 +97,11 @@ bool NickCore::IsServicesOper() const return false; } -bool NickCore::HasPriv(const std::string &privstr) const +bool NickCore::HasPriv(const ci::string &privstr) const { if (!this->ot) - { // No opertype. return false; - } return this->ot->HasPriv(privstr); } @@ -123,7 +121,7 @@ std::string NickCore::GetAccess(unsigned entry) bool NickCore::FindAccess(const std::string &entry) { - for (unsigned i = 0; i < access.size(); ++i) + for (unsigned i = 0, end = access.size(); i < end; ++i) if (access[i] == entry) return true; @@ -132,7 +130,7 @@ bool NickCore::FindAccess(const std::string &entry) void NickCore::EraseAccess(const std::string &entry) { - for (unsigned i = 0; i < access.size(); ++i) + for (unsigned i = 0, end = access.size(); i < end; ++i) if (access[i] == entry) { FOREACH_MOD(I_OnNickEraseAccess, OnNickEraseAccess(this, entry)); |