Fix unnecessary copy initialization findings - #3202
Conversation
PR Summary by QodoEliminate unnecessary local copy initialization
AI Description
Diagram
High-Level Assessment
Files changed (29)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can start a comment with 'qodo' or '@qodo' to chat about any finding |
|
Are you also going to include the ones from #3157 in this pr? I think I could push what I have if you like. |
Go for it |
… copy assignment.
|
| Filename | Overview |
|---|---|
| Core/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp | Reuses const references to control-group object collections without changing selection behavior. |
| Core/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DModelDraw.cpp | Replaces temporary transform copies with const references in rendering and particle-effect paths. |
| Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptConditions.cpp | Removes unnecessary copies and aliases from script-condition evaluation. |
| GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptConditions.cpp | Mirrors the script-condition copy cleanup for the Zero Hour variant. |
| Core/Libraries/Source/WWVegas/WWAudio/Sound3D.cpp | Removes an unnecessary local copy from shared 3D-audio processing. |
Reviews (2): Last reviewed commit: "Revert "perf: avoid Matrix3D copy and un..." | Re-trigger Greptile
…er::update." This reverts commit e2d3915.
I've pushed what I have. I've tried to be conservative with the There are a lot of Here's an example of a pattern that comes up a lot:Changing |
|
This should probably be good for now and we can do some more through static analysis later on |
|
Can do, can you specify which commits or files? 4 and 7 can be ambiguous as sometimes it sorted differently |
performance-unnecessary-copy-initializationfindings across 29 files from clang-tidy.