[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/
This commit is contained in:
Alex King 2023-04-03 16:38:20 -04:00 committed by GitHub
parent c9f27d6f90
commit 6976e27501
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -120,7 +120,7 @@ std::vector<std::string> WorldContentService::GetContentFlagsDisabled()
/**
* @param content_flags
*/
void WorldContentService::SetContentFlags(std::vector<ContentFlagsRepository::ContentFlags> content_flags)
void WorldContentService::SetContentFlags(const std::vector<ContentFlagsRepository::ContentFlags>& content_flags)
{
WorldContentService::content_flags = content_flags;
}

View File

@ -167,7 +167,7 @@ public:
std::vector<std::string> GetContentFlagsDisabled();
bool IsContentFlagEnabled(const std::string& content_flag);
bool IsContentFlagDisabled(const std::string& content_flag);
void SetContentFlags(std::vector<ContentFlagsRepository::ContentFlags> content_flags);
void SetContentFlags(const std::vector<ContentFlagsRepository::ContentFlags>& content_flags);
void ReloadContentFlags();
WorldContentService * SetExpansionContext();