refactor: Fix unnecessary copy initializations - #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 |
|
| Filename | Overview |
|---|---|
| Core/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DModelDraw.cpp | Replaces temporary transform copies with const references in client-side rendering and particle-system paths. |
| Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptConditions.cpp | Removes unused aliases and binds read-only script parameter strings to const references. |
| GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptConditions.cpp | Mirrors the script-condition copy cleanup for the Zero Hour variant. |
| Generals/Code/Tools/WorldBuilder/src/DrawObject.cpp | Simplifies transform construction and removes redundant reset copies while retaining locally mutable transforms. |
| GeneralsMD/Code/Tools/WorldBuilder/src/DrawObject.cpp | Applies the equivalent WorldBuilder transform cleanup to the Zero Hour tool. |
Reviews (8): Last reviewed commit: "fix: address follow-up Matrix3D review f..." | Re-trigger Greptile
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 |
|
I thought I'd edit my previous comment with the commits to avoid another comment, but perhaps you missed it. The PR description also needs updating. |
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
|
I don't understand what the point of the last 3 commits is. It certainly doesn't do what I requested. |
|
I reverted the commits as you asked, but that broke CI for some reason so the last two were to fix that. Did i misunderstand what you asked for? |
5f5cde6 to
9a03b9d
Compare
(I didn't ask for the commits to be reverted but to be removed). It's done now. |
|
Ok, my bad |
performance-unnecessary-copy-initializationfindings across 29 files from clang-tidy.@Caball009 Added their fixes as well, now up to 121 findings across 61 files