Skip to content

Commit 4284795

Browse files
committed
Add more class method modifiers
1 parent 4f444df commit 4284795

File tree

8 files changed

+21
-21
lines changed

8 files changed

+21
-21
lines changed

src/modules/Debug.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Debug::Debug()
4949

5050
#define OVERRIDE_FUNC(offset, func) *(void**)((char*)globalData + offset) = (void*)func
5151

52-
void Debug::Initialize()
52+
void Debug::Initialize() const noexcept
5353
{
5454
// Override all nullsubs in the event functions structure
5555
auto globalData = (GlobalData*)GET_ADDRESS(0x1076980, 0x7C8A50, 0x000000);

src/modules/Debug.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ class Debug : public Module
77
private:
88
bool m_drawDebug = false;
99

10-
void Initialize();
10+
void Initialize() const noexcept;
1111

1212
public:
1313
Debug();
1414

15-
bool IsDrawDebug() { return m_drawDebug; }
15+
bool IsDrawDebug() const noexcept { return m_drawDebug; }
1616

1717
void OnPostInitialize();
1818
void OnMenu();

src/modules/Instance.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void InstanceModule::OnDraw()
7777
}
7878
}
7979

80-
void InstanceModule::DrawInstance()
80+
void InstanceModule::DrawInstance() const
8181
{
8282
auto instance = m_selected;
8383

@@ -219,14 +219,14 @@ void InstanceModule::DrawInstance()
219219
}
220220
}
221221

222-
void InstanceModule::SkewTo(Instance* instance)
222+
void InstanceModule::SkewTo(Instance* instance) const noexcept
223223
{
224224
auto player = Game::GetPlayerInstance();
225225

226226
player->position = instance->position;
227227
}
228228

229-
void InstanceModule::UnhideAll()
229+
void InstanceModule::UnhideAll() const noexcept
230230
{
231231
Instances::Iterate([](Instance* instance)
232232
{

src/modules/Instance.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ class InstanceModule : public Module
1313
Instance* m_selected = nullptr;
1414
char m_filter[64] = "";
1515

16-
void DrawInstance();
17-
void SkewTo(Instance* instance);
18-
void UnhideAll();
16+
void DrawInstance() const;
17+
void SkewTo(Instance* instance) const noexcept;
18+
void UnhideAll() const noexcept;
1919

20-
std::string GetBinary(int value);
20+
static std::string GetBinary(int value);
2121

2222
public:
2323
void OnMenu();
2424
void OnDraw();
2525

26-
Instance* GetSelected() { return m_selected; }
26+
Instance* GetSelected() const noexcept { return m_selected; }
2727
};

src/modules/Level.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void LevelModule::OnDraw()
4848
}
4949
}
5050

51-
void LevelModule::DrawEventDebug()
51+
void LevelModule::DrawEventDebug() noexcept
5252
{
5353
ImGui::Begin("Event debug", &m_eventDebug);
5454
ImGui::Columns(2);
@@ -100,7 +100,7 @@ void LevelModule::DrawEventDebug()
100100
ImGui::End();
101101
}
102102

103-
void LevelModule::DrawEventDebug(StreamUnit* unit)
103+
void LevelModule::DrawEventDebug(StreamUnit* unit) const noexcept
104104
{
105105
auto level = unit->level;
106106

src/modules/Level.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ class LevelModule : public Module
99
bool m_eventDebug = false;
1010
StreamUnit* m_selected = nullptr;
1111

12-
void DrawEventDebug();
13-
void DrawEventDebug(StreamUnit* unit);
12+
void DrawEventDebug() noexcept;
13+
void DrawEventDebug(StreamUnit* unit) const noexcept;
1414

1515
public:
1616
LevelModule();

src/modules/Log.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void Log::OnDraw()
3737
}
3838
}
3939

40-
void Log::Write(const char* fmt, ...)
40+
void Log::Write(const char* fmt, ...) noexcept
4141
{
4242
va_list args;
4343
va_start(args, fmt);
@@ -47,7 +47,7 @@ void Log::Write(const char* fmt, ...)
4747
va_end(args);
4848
}
4949

50-
void Log::WriteLine(const char* fmt, ...)
50+
void Log::WriteLine(const char* fmt, ...) noexcept
5151
{
5252
va_list args;
5353
va_start(args, fmt);
@@ -58,7 +58,7 @@ void Log::WriteLine(const char* fmt, ...)
5858
va_end(args);
5959
}
6060

61-
void Log::Clear()
61+
void Log::Clear() noexcept
6262
{
6363
m_buffer.clear();
6464
}

src/modules/Log.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ class Log : public Module
1515
void OnDraw();
1616

1717
// Writes to the log
18-
void Write(const char* fmt, ...);
18+
void Write(const char* fmt, ...) noexcept;
1919
// Writes a line to the log
20-
void WriteLine(const char* fmt, ...);
20+
void WriteLine(const char* fmt, ...) noexcept;
2121

2222
// Clears the log
23-
void Clear();
23+
void Clear() noexcept;
2424
};

0 commit comments

Comments
 (0)