Skip to content

Use std::string_view for mode names#528

Merged
JanPetterMG merged 2 commits intomainfrom
chore/modes-name-string-view
Apr 15, 2026
Merged

Use std::string_view for mode names#528
JanPetterMG merged 2 commits intomainfrom
chore/modes-name-string-view

Conversation

@JanPetterMG
Copy link
Copy Markdown
Collaborator

Refactors mode name handling to use std::string_view instead of owning string types.

This reduces unnecessary allocations and improves overall efficiency, especially in static and compile-time contexts where service names are immutable.

Changes

  • Replace mode name storage with std::string_view
  • Update constructors and interfaces to accept non-owning string references
  • Remove redundant string allocations and copies

Impact

  • No functional changes
  • Improved performance and memory usage
  • Safer and clearer API contracts

@JanPetterMG JanPetterMG added firmware C++ related chore This issue or pull request is a maintenance task labels Apr 15, 2026
@JanPetterMG JanPetterMG added this to the v2.4.0 milestone Apr 15, 2026
@JanPetterMG JanPetterMG marked this pull request as ready for review April 15, 2026 13:39
@JanPetterMG JanPetterMG added this pull request to the merge queue Apr 15, 2026
Merged via the queue into main with commit a47be19 Apr 15, 2026
154 checks passed
@JanPetterMG JanPetterMG deleted the chore/modes-name-string-view branch April 15, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore This issue or pull request is a maintenance task firmware C++ related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant