Skip to content

use std::exchange in move ctors/assignment operators#7520

Open
Goober5000 wants to merge 1 commit into
scp-fs2open:masterfrom
Goober5000:fix/std_exchange
Open

use std::exchange in move ctors/assignment operators#7520
Goober5000 wants to merge 1 commit into
scp-fs2open:masterfrom
Goober5000:fix/std_exchange

Conversation

@Goober5000

Copy link
Copy Markdown
Contributor

Replaces the copy-then-reset idiom with std::exchange in five steal-and-reset move constructors and assignment operators.

@Goober5000 Goober5000 added cleanup A modification or rewrite of code to make it more understandable or easier to maintain. Waiting for Stable Marks a pull request that is to be merged after the next stable release, due to a release cycle labels Jun 12, 2026
Replaces the copy-then-reset idiom with std::exchange in five
steal-and-reset move constructors and assignment operators.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup A modification or rewrite of code to make it more understandable or easier to maintain. Waiting for Stable Marks a pull request that is to be merged after the next stable release, due to a release cycle

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant