Skip to content

Commit fc2eee4

Browse files
committed
minor clean ups
1 parent 3e211cd commit fc2eee4

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/dllmain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ void mod_main(HMODULE module) {
2222
conout.close();
2323
conin.close();
2424
FreeConsole();
25-
FreeLibraryAndExitThread(cast<HMODULE>(module), 0);
25+
FreeLibraryAndExitThread(module, 0);
2626
#endif
2727
}

src/hooks.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void Hooks::PlayLayer::resetLevel(gd::PlayLayer* self) {
9898
orig<&resetLevel>(self);
9999
auto& rs = ReplaySystem::get();
100100
rs.on_reset();
101-
ReplaySystem::get().recorder.update_song_offset(self);
101+
rs.recorder.update_song_offset(self);
102102
}
103103

104104

@@ -129,8 +129,7 @@ void Hooks::PlayLayer::levelComplete(gd::PlayLayer* self) {
129129
}
130130

131131
void _on_exit_level() {
132-
auto& rs = ReplaySystem::get();
133-
rs.reset_state();
132+
ReplaySystem::get().reset_state();
134133
}
135134

136135
void Hooks::PlayLayer::onQuit(gd::PlayLayer* self) {

src/replay_system.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ class ReplaySystem {
3434
return instance;
3535
}
3636

37+
// prevent myself from accidentally copying it
38+
ReplaySystem(const ReplaySystem&) = delete;
39+
3740
inline auto& get_replay() { return replay; }
3841
inline auto get_default_fps() { return default_fps; }
3942
inline void set_default_fps(float fps) { default_fps = fps; }

0 commit comments

Comments
 (0)