mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 10:15:32 +00:00
Constify a few things
This commit is contained in:
parent
efb241f1de
commit
32981bcd88
5 changed files with 9 additions and 9 deletions
|
@ -58,12 +58,12 @@ namespace MWGui
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int TimeAdvancer::getHours()
|
int TimeAdvancer::getHours() const
|
||||||
{
|
{
|
||||||
return mHours;
|
return mHours;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TimeAdvancer::isRunning()
|
bool TimeAdvancer::isRunning() const
|
||||||
{
|
{
|
||||||
return mRunning;
|
return mRunning;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,8 @@ namespace MWGui
|
||||||
void stop();
|
void stop();
|
||||||
void onFrame(float dt);
|
void onFrame(float dt);
|
||||||
|
|
||||||
int getHours();
|
int getHours() const;
|
||||||
bool isRunning();
|
bool isRunning() const;
|
||||||
|
|
||||||
// signals
|
// signals
|
||||||
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
||||||
|
|
|
@ -63,7 +63,7 @@ namespace MWRender
|
||||||
{
|
{
|
||||||
std::set<ESM::RefNum> mDisabled;
|
std::set<ESM::RefNum> mDisabled;
|
||||||
std::set<ESM::RefNum> mBlacklist;
|
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 mRefTracker;
|
||||||
RefTracker mRefTrackerNew;
|
RefTracker mRefTrackerNew;
|
||||||
|
|
|
@ -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)
|
if(mOldestSlotVisited == nullptr)
|
||||||
return true;
|
return true;
|
||||||
return (compare->mTimeStamp <= mOldestSlotVisited->mTimeStamp);
|
return (compare->mTimeStamp <= mOldestSlotVisited->mTimeStamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MWState::QuickSaveManager::shouldCreateNewSlot()
|
bool MWState::QuickSaveManager::shouldCreateNewSlot() const
|
||||||
{
|
{
|
||||||
return (mSlotsVisited < mMaxSaves);
|
return (mSlotsVisited < mMaxSaves);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,8 +13,8 @@ namespace MWState{
|
||||||
unsigned int mSlotsVisited;
|
unsigned int mSlotsVisited;
|
||||||
const Slot *mOldestSlotVisited;
|
const Slot *mOldestSlotVisited;
|
||||||
private:
|
private:
|
||||||
bool shouldCreateNewSlot();
|
bool shouldCreateNewSlot() const;
|
||||||
bool isOldestSave(const Slot *compare);
|
bool isOldestSave(const Slot *compare) const;
|
||||||
public:
|
public:
|
||||||
QuickSaveManager(std::string &saveName, unsigned int maxSaves);
|
QuickSaveManager(std::string &saveName, unsigned int maxSaves);
|
||||||
///< A utility class to manage multiple quicksave slots
|
///< A utility class to manage multiple quicksave slots
|
||||||
|
|
Loading…
Reference in a new issue