Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

fix: Remove unnecessary std::move from temporary objects in Text struct #2090

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

qnixsynapse
Copy link
Contributor

Describe Your Changes

  • This pull request addresses a compiler warning related to moving temporary objects in the Text struct's annotation parsing logic. The changes involve removing std::move calls from the assignment of temporary strings returned by asString() for both the type and annotation_text variables.

Using std::move on temporary objects can prevent copy elision and lead to potential issues in the code. By directly assigning the result of asString() to the respective variables, we ensure that the code is cleaner and free from unnecessary moves, thus keeping the compiler happy.

@qnixsynapse qnixsynapse merged commit d1dccf3 into dev Mar 10, 2025
8 checks passed
@qnixsynapse qnixsynapse deleted the remove_move branch March 10, 2025 08:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants