Skip to content

Commit fb0f4e9

Browse files
committed
optimize: use std::move for ScopedClearLoopStartOffsets
1 parent 142bf9d commit fb0f4e9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

nvse/nvse/Hooks_Script.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -501,13 +501,12 @@ struct ScopedClearLoopStartOffsets
501501

502502
ScopedClearLoopStartOffsets()
503503
{
504-
this->loopStartOffsets = s_loopStartOffsets;
505-
s_loopStartOffsets = std::stack<UInt8*>();
504+
this->loopStartOffsets = std::move(s_loopStartOffsets);
506505
}
507506

508507
~ScopedClearLoopStartOffsets()
509508
{
510-
s_loopStartOffsets = this->loopStartOffsets;
509+
s_loopStartOffsets = std::move(this->loopStartOffsets);
511510
}
512511
};
513512

0 commit comments

Comments
 (0)