From 7d00261f6b3bf7da2b9371796848883dc3b40392 Mon Sep 17 00:00:00 2001 From: Aki Date: Thu, 7 Apr 2022 00:10:08 +0200 Subject: Made Game accessors const and fixed minor formatting issues --- StarsEx/Game.h | 6 +++--- StarsEx/StarServer.cpp | 3 ++- StarsEx/StarServer.h | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'StarsEx') diff --git a/StarsEx/Game.h b/StarsEx/Game.h index 8a9caa8..50b3379 100644 --- a/StarsEx/Game.h +++ b/StarsEx/Game.h @@ -56,9 +56,9 @@ public: DWORD Frame(); - bool Active() { return active; } - bool Paused() { return paused; } - virtual bool Server() { return false; } + bool Active() const { return active; } + bool Paused() const { return paused; } + virtual bool Server() const { return false; } virtual void PumpEvents(); virtual void GameLoop(); diff --git a/StarsEx/StarServer.cpp b/StarsEx/StarServer.cpp index 0cf470a..8d76f38 100644 --- a/StarsEx/StarServer.cpp +++ b/StarsEx/StarServer.cpp @@ -225,6 +225,7 @@ StarServer::CreateWorld() } } + void StarServer::InstantiateMission() { @@ -302,7 +303,7 @@ StarServer::GameState() bool -StarServer::Server() +StarServer::Server() const { return true; } diff --git a/StarsEx/StarServer.h b/StarsEx/StarServer.h index 81c846b..0bcab06 100644 --- a/StarsEx/StarServer.h +++ b/StarsEx/StarServer.h @@ -28,15 +28,16 @@ public: virtual bool Init(HINSTANCE hi, HINSTANCE hpi, LPSTR cmdline, int nCmdShow); virtual bool InitGame(); + + virtual void UpdateWorld(); virtual void GameState(); - bool Server() override; + bool Server() const override; void SetGameMode(int mode) override; void CreateWorld(); protected: - virtual void UpdateWorld(); virtual void InstantiateMission(); Universe* world; -- cgit v1.1