File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -386,7 +386,7 @@ bool GamePlayer::IsHQTent() const
386386
387387void GamePlayer::SetHQIsTent (bool isTent)
388388{
389- if (nobHQ* hq = GetHQ ())
389+ if (nobHQ* hq = const_cast <nobHQ*>( GetHQ () ))
390390 hq->SetIsTent (isTent);
391391}
392392
@@ -1379,10 +1379,10 @@ void GamePlayer::TestDefeat()
13791379 Surrender ();
13801380}
13811381
1382- nobHQ* GamePlayer::GetHQ () const
1382+ const nobHQ* GamePlayer::GetHQ () const
13831383{
13841384 const MapPoint& hqPos = GetHQPos ();
1385- return const_cast <nobHQ*>( hqPos.isValid () ? GetGameWorld ().GetSpecObj <nobHQ>(hqPos) : nullptr ) ;
1385+ return hqPos.isValid () ? GetGameWorld ().GetSpecObj <nobHQ>(hqPos) : nullptr ;
13861386}
13871387
13881388void GamePlayer::Surrender ()
Original file line number Diff line number Diff line change @@ -430,7 +430,7 @@ class GamePlayer : public GamePlayerInfo
430430 bool FindWarehouseForJob (Job job, noRoadNode* goal) const ;
431431 // / Prüft, ob der Spieler besiegt wurde
432432 void TestDefeat ();
433- nobHQ* GetHQ () const ;
433+ const nobHQ* GetHQ () const ;
434434
435435 // ////////////////////////////////////////////////////////////////////////
436436 // / Unsynchronized state (e.g. lua, gui...)
You can’t perform that action at this time.
0 commit comments