From 2a7d0e6fe3ac214d4bec57dc1991c19b0b02757b Mon Sep 17 00:00:00 2001 From: Mitch Richters Date: Mon, 15 Nov 2021 08:56:49 +1100 Subject: [PATCH] - `gi->AddExcludedEpisode()`: Pass FString variable through as reference instead of by value. --- source/core/gamestruct.h | 2 +- source/games/duke/src/duke3d.h | 2 +- source/games/duke/src/gamedef.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/core/gamestruct.h b/source/core/gamestruct.h index 9541d2108..03f82dcec 100644 --- a/source/core/gamestruct.h +++ b/source/core/gamestruct.h @@ -120,7 +120,7 @@ struct GameInterface virtual void LeavePortal(spritetype* viewer, int type) {} virtual bool GetGeoEffect(GeoEffect* eff, int viewsector) { return false; } virtual int Voxelize(int sprnum) { return -1; } - virtual void AddExcludedEpisode(FString episode) {} + virtual void AddExcludedEpisode(const FString& episode) {} virtual int GetCurrentSkill() { return -1; } virtual bool IsQAVInterpTypeValid(const FString& type) { return false; } virtual void AddQAVInterpProps(const int res_id, const FString& interptype, const bool loopable, const TMap>&& ignoredata) { } diff --git a/source/games/duke/src/duke3d.h b/source/games/duke/src/duke3d.h index 37b356667..7d4fe3bb2 100644 --- a/source/games/duke/src/duke3d.h +++ b/source/games/duke/src/duke3d.h @@ -68,7 +68,7 @@ struct GameInterface : public ::GameInterface void EnterPortal(spritetype* viewer, int type) override; void LeavePortal(spritetype* viewer, int type) override; bool GetGeoEffect(GeoEffect* eff, int viewsector) override; - void AddExcludedEpisode(FString episode) override; + void AddExcludedEpisode(const FString& episode) override; int GetCurrentSkill() override; }; diff --git a/source/games/duke/src/gamedef.cpp b/source/games/duke/src/gamedef.cpp index 4fbfbb9ec..5f6f061fd 100644 --- a/source/games/duke/src/gamedef.cpp +++ b/source/games/duke/src/gamedef.cpp @@ -62,7 +62,7 @@ enum { VERSIONCHECK = 41 }; static TArray exclEpisodes; -void GameInterface::AddExcludedEpisode(FString episode) +void GameInterface::AddExcludedEpisode(const FString& episode) { auto s = FStringTable::MakeMacro(episode.GetChars()); s.StripRight();