Merge lp:~hjd/widelands/optimizations into lp:widelands
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 6370 | ||||
Proposed branch: | lp:~hjd/widelands/optimizations | ||||
Merge into: | lp:widelands | ||||
Diff against target: |
473 lines (+45/-45) 22 files modified
src/economy/flag.cc (+2/-2) src/economy/test/test_routing.cc (+2/-2) src/game_io/game_cmd_queue_data_packet.cc (+1/-1) src/graphic/richtext.cc (+1/-1) src/i18n.cc (+2/-2) src/logic/bob.cc (+3/-3) src/logic/building.cc (+2/-2) src/logic/cmd_queue.cc (+1/-1) src/logic/game.cc (+1/-1) src/logic/immovable.cc (+1/-1) src/logic/militarysite.cc (+1/-1) src/logic/player.cc (+1/-1) src/logic/production_program.cc (+1/-1) src/logic/productionsite.cc (+3/-3) src/logic/soldier.cc (+11/-11) src/logic/tribe.cc (+1/-1) src/logic/warehouse.cc (+3/-3) src/logic/worker.cc (+2/-2) src/network/nethost.cc (+2/-2) src/ui_basic/box.cc (+2/-2) src/writeHTML.cc (+1/-1) src/wui/soldierlist.cc (+1/-1) |
||||
To merge this branch: | bzr merge lp:~hjd/widelands/optimizations | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Widelands Developers | Pending | ||
Review via email: mp+101116@code.launchpad.net |
Description of the change
I ran utils/create_
Now, c++ is not the language which I'm most proficient in. So to check whether this seems like a good idea, I have pushed this inital patch which fix one file. If people approve of this intial work, I can submit a larger patch which fix more issues in the future.
Also, I'm a bit confused, though this might be due to how cppcheck works. Because I have fixed the two places it complained about in economy/flag.cc, however, size() is used in a similar way at line 72. I guess this isn't listed since it is only a if check, not a while loop which would run the same comparision multiple times. Still, I wonder if checks like this should be changed as well?
I totally approve! In fact, we have a code-style checker rule for
exactly this, seems like it missed these places though.