From 6976e275012ec89371b61d4596f6194f128d1beb Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Mon, 3 Apr 2023 16:38:20 -0400 Subject: [PATCH] [Cleanup] Use a constant reference for content_flags in SetContentFlags() (#3196) # Notes - This is more performant. - https://pvs-studio.com/en/docs/warnings/v813/ - https://pvs-studio.com/en/docs/warnings/v820/ --- common/content/world_content_service.cpp | 2 +- common/content/world_content_service.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/content/world_content_service.cpp b/common/content/world_content_service.cpp index 27be467cf..5bd19ba96 100644 --- a/common/content/world_content_service.cpp +++ b/common/content/world_content_service.cpp @@ -120,7 +120,7 @@ std::vector WorldContentService::GetContentFlagsDisabled() /** * @param content_flags */ -void WorldContentService::SetContentFlags(std::vector content_flags) +void WorldContentService::SetContentFlags(const std::vector& content_flags) { WorldContentService::content_flags = content_flags; } diff --git a/common/content/world_content_service.h b/common/content/world_content_service.h index de667ad1d..f2661831a 100644 --- a/common/content/world_content_service.h +++ b/common/content/world_content_service.h @@ -167,7 +167,7 @@ public: std::vector GetContentFlagsDisabled(); bool IsContentFlagEnabled(const std::string& content_flag); bool IsContentFlagDisabled(const std::string& content_flag); - void SetContentFlags(std::vector content_flags); + void SetContentFlags(const std::vector& content_flags); void ReloadContentFlags(); WorldContentService * SetExpansionContext();