Skip to content

Conversation

@maxbachmann
Copy link

These functions are supposed to return a const reference instead of a copy that isn't allowed to be modified.

@maxbachmann maxbachmann changed the title fix unwanted string copy fix unwanted copies of return values May 23, 2025
@maxbachmann maxbachmann reopened this May 23, 2025
@maxbachmann
Copy link
Author

maxbachmann commented May 23, 2025

Edit: Thinking about this a bit more this was probably supposed to guard against the config hashmap getting modified.

I cleaned this up in a couple of ways:

  • return by value instead of const value
  • remove outdated static empty string that doesn't serve any purpose anymore
  • avoid unnecessary copy of the config hashmap when getting the log / shared content directory

@maxbachmann maxbachmann marked this pull request as draft May 23, 2025 13:51
@maxbachmann maxbachmann marked this pull request as ready for review May 23, 2025 13:59
@maxbachmann
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant