aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Reputation
diff options
context:
space:
mode:
authorSpp <none@none>2010-12-06 02:07:53 +0100
committerSpp <none@none>2010-12-06 02:07:53 +0100
commit408fce1de69249b82cc042cb31f3fd16983c7e81 (patch)
treef4b99f386821e70f155d9aa61b70cfb1f2d3d825 /src/server/game/Reputation
parente226c4ac344d06c7abbd6f04725ced2b33606349 (diff)
Core: Some optimizations
- Declare some functions const - Fix some mem leak - Fix some resource leak - Remove unused variables and functions - Remove duplicate functions - Reduce the scope of some variables - Remove unused file --HG-- branch : trunk
Diffstat (limited to 'src/server/game/Reputation')
-rwxr-xr-xsrc/server/game/Reputation/ReputationMgr.cpp4
-rwxr-xr-xsrc/server/game/Reputation/ReputationMgr.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index 934c8579edd..cbd469edb69 100755
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -424,7 +424,7 @@ void ReputationMgr::SetAtWar(RepListID repListID, bool on)
SetAtWar(&itr->second,on);
}
-void ReputationMgr::SetAtWar(FactionState* faction, bool atWar)
+void ReputationMgr::SetAtWar(FactionState* faction, bool atWar) const
{
// not allow declare war to own faction
if (atWar && (faction->Flags & FACTION_FLAG_PEACE_FORCED))
@@ -452,7 +452,7 @@ void ReputationMgr::SetInactive(RepListID repListID, bool on)
SetInactive(&itr->second,on);
}
-void ReputationMgr::SetInactive(FactionState* faction, bool inactive)
+void ReputationMgr::SetInactive(FactionState* faction, bool inactive) const
{
// always invisible or hidden faction can't be inactive
if (inactive && ((faction->Flags & (FACTION_FLAG_INVISIBLE_FORCED|FACTION_FLAG_HIDDEN)) || !(faction->Flags & FACTION_FLAG_VISIBLE)))
diff --git a/src/server/game/Reputation/ReputationMgr.h b/src/server/game/Reputation/ReputationMgr.h
index 2fe3054971e..2d167c9c1dc 100755
--- a/src/server/game/Reputation/ReputationMgr.h
+++ b/src/server/game/Reputation/ReputationMgr.h
@@ -141,8 +141,8 @@ class ReputationMgr
bool SetReputation(FactionEntry const* factionEntry, int32 standing, bool incremental);
bool SetOneFactionReputation(FactionEntry const* factionEntry, int32 standing, bool incremental);
void SetVisible(FactionState* faction);
- void SetAtWar(FactionState* faction, bool atWar);
- void SetInactive(FactionState* faction, bool inactive);
+ void SetAtWar(FactionState* faction, bool atWar) const;
+ void SetInactive(FactionState* faction, bool inactive) const;
void SendVisible(FactionState const* faction) const;
void UpdateRankCounters(ReputationRank old_rank, ReputationRank new_rank);
private: