1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Constify a few things

This commit is contained in:
fredzio 2021-03-29 19:44:23 +02:00
parent efb241f1de
commit 32981bcd88
5 changed files with 9 additions and 9 deletions

View file

@ -58,12 +58,12 @@ namespace MWGui
}
}
int TimeAdvancer::getHours()
int TimeAdvancer::getHours() const
{
return mHours;
}
bool TimeAdvancer::isRunning()
bool TimeAdvancer::isRunning() const
{
return mRunning;
}

View file

@ -14,8 +14,8 @@ namespace MWGui
void stop();
void onFrame(float dt);
int getHours();
bool isRunning();
int getHours() const;
bool isRunning() const;
// signals
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;

View file

@ -63,7 +63,7 @@ namespace MWRender
{
std::set<ESM::RefNum> mDisabled;
std::set<ESM::RefNum> mBlacklist;
bool operator==(const RefTracker&other) { return mDisabled == other.mDisabled && mBlacklist == other.mBlacklist; }
bool operator==(const RefTracker&other) const { return mDisabled == other.mDisabled && mBlacklist == other.mBlacklist; }
};
RefTracker mRefTracker;
RefTracker mRefTrackerNew;

View file

@ -18,14 +18,14 @@ void MWState::QuickSaveManager::visitSave(const Slot *saveSlot)
}
}
bool MWState::QuickSaveManager::isOldestSave(const Slot *compare)
bool MWState::QuickSaveManager::isOldestSave(const Slot *compare) const
{
if(mOldestSlotVisited == nullptr)
return true;
return (compare->mTimeStamp <= mOldestSlotVisited->mTimeStamp);
}
bool MWState::QuickSaveManager::shouldCreateNewSlot()
bool MWState::QuickSaveManager::shouldCreateNewSlot() const
{
return (mSlotsVisited < mMaxSaves);
}

View file

@ -13,8 +13,8 @@ namespace MWState{
unsigned int mSlotsVisited;
const Slot *mOldestSlotVisited;
private:
bool shouldCreateNewSlot();
bool isOldestSave(const Slot *compare);
bool shouldCreateNewSlot() const;
bool isOldestSave(const Slot *compare) const;
public:
QuickSaveManager(std::string &saveName, unsigned int maxSaves);
///< A utility class to manage multiple quicksave slots