Remove the use of "and", "or" and "not".
Bug #1343302 reported by
SirVer
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Low
|
Unassigned |
Bug Description
and should be &&, or should be || and not should be !. A codecheck rule that finds all occurencces outside of comments and strings should be added as well. Of course all other operator synonyms should be disallowed as well: http://
Related branches
lp:~widelands-dev/widelands/bug-1343302
- SirVer: Approve
- GunChleoc: Needs Resubmitting
-
Diff: 6513 lines (+846/-840)156 files modifiedsrc/ai/ai_help_structs.cc (+3/-3)
src/ai/defaultai.cc (+99/-98)
src/base/md5.h (+1/-1)
src/base/point.cc (+2/-2)
src/economy/cmd_call_economy_balance.cc (+1/-1)
src/economy/economy.cc (+4/-4)
src/economy/economy_data_packet.cc (+1/-1)
src/economy/flag.cc (+3/-3)
src/economy/flag.h (+2/-2)
src/economy/fleet.cc (+1/-1)
src/economy/idleworkersupply.cc (+1/-1)
src/economy/request.cc (+8/-8)
src/economy/road.cc (+9/-9)
src/economy/transfer.cc (+1/-1)
src/economy/ware_instance.cc (+1/-1)
src/economy/wares_queue.cc (+1/-1)
src/editor/editorinteractive.cc (+4/-4)
src/editor/map_generator.cc (+4/-4)
src/editor/tools/editor_history.cc (+3/-3)
src/editor/tools/editor_increase_resources_tool.cc (+3/-3)
src/editor/tools/editor_place_bob_tool.cc (+2/-2)
src/editor/tools/editor_place_immovable_tool.cc (+4/-4)
src/editor/tools/editor_set_resources_tool.cc (+2/-2)
src/editor/tools/editor_set_terrain_tool.cc (+4/-4)
src/editor/ui_menus/categorized_item_selection_menu.h (+2/-2)
src/editor/ui_menus/editor_main_menu_load_map.cc (+4/-4)
src/editor/ui_menus/editor_main_menu_save_map.cc (+10/-10)
src/editor/ui_menus/editor_player_menu.cc (+3/-3)
src/editor/ui_menus/editor_player_menu_allowed_buildings_menu.cc (+1/-1)
src/editor/ui_menus/editor_tool_place_bob_options_menu.cc (+2/-2)
src/game_io/game_interactive_player_data_packet.cc (+1/-1)
src/game_io/game_map_data_packet.cc (+1/-1)
src/game_io/game_player_economies_data_packet.cc (+1/-1)
src/game_io/game_player_info_data_packet.cc (+2/-2)
src/graphic/animation.cc (+3/-3)
src/graphic/color.cc (+1/-1)
src/graphic/font_handler.cc (+1/-1)
src/graphic/graphic.cc (+5/-5)
src/graphic/image_transformations.cc (+1/-1)
src/graphic/render/gl_surface_texture.cc (+7/-7)
src/graphic/render/minimaprenderer.cc (+5/-5)
src/graphic/render/terrain_sdl.h (+5/-5)
src/graphic/rendertarget.cc (+1/-1)
src/graphic/text/rt_parse.cc (+4/-4)
src/graphic/text/sdl_ttf_font.cc (+1/-1)
src/graphic/text/test/render_richtext.cc (+1/-1)
src/graphic/text/textstream.cc (+3/-3)
src/graphic/text_parser.cc (+1/-1)
src/io/fileread.cc (+2/-2)
src/io/filesystem/disk_filesystem.cc (+5/-5)
src/io/filesystem/filesystem.cc (+1/-1)
src/io/filesystem/layered_filesystem.cc (+11/-11)
src/io/filesystem/zip_filesystem.cc (+1/-1)
src/io/filewrite.cc (+1/-1)
src/logic/battle.cc (+8/-8)
src/logic/bill_of_materials.h (+1/-1)
src/logic/bob.cc (+3/-3)
src/logic/buildcost.cc (+1/-1)
src/logic/building.cc (+8/-8)
src/logic/checkstep.cc (+6/-6)
src/logic/cmd_queue.cc (+1/-1)
src/logic/constructionsite.cc (+2/-2)
src/logic/dismantlesite.cc (+3/-3)
src/logic/editor_game_base.cc (+7/-7)
src/logic/game.cc (+5/-5)
src/logic/game_controller.h (+1/-1)
src/logic/immovable.cc (+19/-19)
src/logic/map.cc (+7/-7)
src/logic/mapdifferenceregion.cc (+4/-4)
src/logic/mapdifferenceregion.h (+4/-4)
src/logic/maphollowregion.cc (+4/-4)
src/logic/maptriangleregion.cc (+2/-2)
src/logic/militarysite.cc (+6/-6)
src/logic/player.cc (+24/-24)
src/logic/playercommand.cc (+9/-9)
src/logic/production_program.cc (+51/-51)
src/logic/productionsite.cc (+7/-7)
src/logic/requirements.cc (+3/-3)
src/logic/single_player_game_settings_provider.cc (+2/-2)
src/logic/soldier.cc (+20/-20)
src/logic/trainingsite.cc (+1/-1)
src/logic/tribe.cc (+3/-3)
src/logic/warehouse.cc (+4/-4)
src/logic/warelist.h (+1/-1)
src/logic/widelands.h (+9/-9)
src/logic/widelands_geometry.cc (+3/-3)
src/logic/widelands_geometry.h (+8/-8)
src/logic/widelands_geometry_io.cc (+2/-2)
src/logic/worker.cc (+14/-14)
src/logic/worker.h (+1/-1)
src/map_io/s2map.cc (+5/-5)
src/map_io/widelands_map_building_data_packet.cc (+1/-1)
src/map_io/widelands_map_buildingdata_data_packet.cc (+10/-10)
src/map_io/widelands_map_extradata_data_packet.cc (+1/-1)
src/map_io/widelands_map_flagdata_data_packet.cc (+4/-4)
src/map_io/widelands_map_players_messages_data_packet.cc (+5/-5)
src/map_io/widelands_map_players_view_data_packet.cc (+10/-10)
src/map_io/widelands_map_road_data_packet.cc (+1/-1)
src/map_io/widelands_map_roaddata_data_packet.cc (+10/-10)
src/map_io/widelands_map_saver.cc (+1/-1)
src/map_io/widelands_map_scripting_data_packet.cc (+1/-1)
src/network/internet_gaming.cc (+1/-1)
src/network/nethost.cc (+5/-5)
src/network/network.cc (+1/-1)
src/profile/profile.cc (+10/-10)
src/scripting/c_utils.cc (+5/-5)
src/scripting/lua_bases.cc (+11/-11)
src/scripting/lua_game.cc (+8/-8)
src/scripting/lua_globals.cc (+2/-2)
src/scripting/lua_map.cc (+3/-3)
src/scripting/lua_table.h (+1/-1)
src/scripting/lua_ui.cc (+3/-3)
src/scripting/scripting.cc (+1/-1)
src/sound/sound_handler.cc (+6/-6)
src/ui_basic/button.cc (+7/-7)
src/ui_basic/checkbox.cc (+6/-6)
src/ui_basic/editbox.cc (+3/-3)
src/ui_basic/listselect.cc (+5/-5)
src/ui_basic/multilineeditbox.cc (+1/-1)
src/ui_basic/multilinetextarea.cc (+1/-1)
src/ui_basic/panel.cc (+19/-19)
src/ui_basic/progresswindow.cc (+1/-1)
src/ui_basic/slider.cc (+16/-16)
src/ui_basic/table.cc (+4/-4)
src/ui_basic/unique_window.cc (+1/-1)
src/ui_basic/window.cc (+27/-27)
src/ui_fsmenu/editor_mapselect.cc (+4/-4)
src/ui_fsmenu/internet_lobby.cc (+1/-1)
src/ui_fsmenu/intro.cc (+1/-1)
src/ui_fsmenu/launch_spg.cc (+2/-2)
src/ui_fsmenu/mapselect.cc (+5/-5)
src/ui_fsmenu/netsetup_lan.cc (+1/-1)
src/ui_fsmenu/options.cc (+5/-5)
src/wlapplication.cc (+9/-9)
src/wui/actionconfirm.cc (+17/-17)
src/wui/building_statistics_menu.cc (+11/-11)
src/wui/buildingwindow.cc (+9/-9)
src/wui/chat_msg_layout.cc (+2/-2)
src/wui/encyclopedia_window.cc (+2/-2)
src/wui/fieldaction.cc (+11/-11)
src/wui/game_main_menu.cc (+2/-2)
src/wui/game_message_menu.cc (+2/-2)
src/wui/game_objectives_menu.cc (+3/-3)
src/wui/game_options_sound_menu.cc (+6/-6)
src/wui/general_statistics_menu.cc (+1/-1)
src/wui/interactive_base.cc (+21/-16)
src/wui/interactive_player.cc (+2/-2)
src/wui/mapview.cc (+3/-3)
src/wui/mapviewpixelfunctions.cc (+1/-1)
src/wui/overlay_manager.cc (+10/-10)
src/wui/plot_area.cc (+1/-1)
src/wui/productionsitewindow.cc (+2/-2)
src/wui/shipwindow.cc (+2/-2)
src/wui/transport_ui.cc (+2/-2)
src/wui/waresdisplay.cc (+1/-1)
src/wui/waresqueuedisplay.cc (+5/-5)
lp:~widelands-dev/widelands/bug-1343302_codecheck
- SirVer: Approve
-
Diff: 6593 lines (+906/-835) (has conflicts)157 files modifiedcmake/codecheck/rules/do_not_use_operator_synonyms (+35/-0)
src/ai/ai_help_structs.cc (+3/-3)
src/ai/defaultai.cc (+99/-98)
src/base/md5.h (+1/-1)
src/base/point.cc (+2/-2)
src/economy/cmd_call_economy_balance.cc (+1/-1)
src/economy/economy.cc (+4/-4)
src/economy/economy_data_packet.cc (+1/-1)
src/economy/flag.cc (+3/-3)
src/economy/flag.h (+2/-2)
src/economy/fleet.cc (+1/-1)
src/economy/idleworkersupply.cc (+1/-1)
src/economy/request.cc (+8/-8)
src/economy/road.cc (+9/-9)
src/economy/transfer.cc (+1/-1)
src/economy/ware_instance.cc (+1/-1)
src/economy/wares_queue.cc (+1/-1)
src/editor/editorinteractive.cc (+4/-4)
src/editor/map_generator.cc (+4/-4)
src/editor/tools/editor_history.cc (+3/-3)
src/editor/tools/editor_increase_resources_tool.cc (+3/-3)
src/editor/tools/editor_place_bob_tool.cc (+2/-2)
src/editor/tools/editor_place_immovable_tool.cc (+4/-4)
src/editor/tools/editor_set_resources_tool.cc (+2/-2)
src/editor/tools/editor_set_terrain_tool.cc (+4/-4)
src/editor/ui_menus/categorized_item_selection_menu.h (+2/-2)
src/editor/ui_menus/editor_main_menu_load_map.cc (+4/-4)
src/editor/ui_menus/editor_main_menu_save_map.cc (+10/-10)
src/editor/ui_menus/editor_player_menu.cc (+3/-3)
src/editor/ui_menus/editor_player_menu_allowed_buildings_menu.cc (+1/-1)
src/editor/ui_menus/editor_tool_place_bob_options_menu.cc (+2/-2)
src/game_io/game_interactive_player_data_packet.cc (+1/-1)
src/game_io/game_map_data_packet.cc (+1/-1)
src/game_io/game_player_economies_data_packet.cc (+1/-1)
src/game_io/game_player_info_data_packet.cc (+2/-2)
src/graphic/animation.cc (+7/-2)
src/graphic/color.cc (+1/-1)
src/graphic/font_handler.cc (+1/-1)
src/graphic/graphic.cc (+5/-5)
src/graphic/image_transformations.cc (+1/-1)
src/graphic/render/gl_surface_texture.cc (+7/-7)
src/graphic/render/minimaprenderer.cc (+5/-5)
src/graphic/render/terrain_sdl.h (+5/-5)
src/graphic/rendertarget.cc (+1/-1)
src/graphic/text/rt_parse.cc (+4/-4)
src/graphic/text/sdl_ttf_font.cc (+1/-1)
src/graphic/text/test/render_richtext.cc (+1/-1)
src/graphic/text/textstream.cc (+3/-3)
src/graphic/text_parser.cc (+1/-1)
src/io/fileread.cc (+2/-2)
src/io/filesystem/disk_filesystem.cc (+5/-5)
src/io/filesystem/filesystem.cc (+1/-1)
src/io/filesystem/layered_filesystem.cc (+11/-11)
src/io/filesystem/zip_filesystem.cc (+1/-1)
src/io/filewrite.cc (+1/-1)
src/logic/battle.cc (+8/-8)
src/logic/bill_of_materials.h (+1/-1)
src/logic/bob.cc (+3/-3)
src/logic/buildcost.cc (+1/-1)
src/logic/building.cc (+8/-8)
src/logic/checkstep.cc (+6/-6)
src/logic/cmd_queue.cc (+1/-1)
src/logic/constructionsite.cc (+2/-2)
src/logic/dismantlesite.cc (+3/-3)
src/logic/editor_game_base.cc (+10/-6)
src/logic/game.cc (+5/-5)
src/logic/game_controller.h (+1/-1)
src/logic/immovable.cc (+19/-19)
src/logic/map.cc (+7/-7)
src/logic/mapdifferenceregion.cc (+4/-4)
src/logic/mapdifferenceregion.h (+4/-4)
src/logic/maphollowregion.cc (+4/-4)
src/logic/maptriangleregion.cc (+2/-2)
src/logic/militarysite.cc (+6/-6)
src/logic/player.cc (+24/-24)
src/logic/playercommand.cc (+9/-9)
src/logic/production_program.cc (+62/-50)
src/logic/productionsite.cc (+7/-7)
src/logic/requirements.cc (+3/-3)
src/logic/single_player_game_settings_provider.cc (+2/-2)
src/logic/soldier.cc (+20/-20)
src/logic/trainingsite.cc (+1/-1)
src/logic/tribe.cc (+3/-3)
src/logic/warehouse.cc (+4/-4)
src/logic/warelist.h (+1/-1)
src/logic/widelands.h (+9/-9)
src/logic/widelands_geometry.cc (+3/-3)
src/logic/widelands_geometry.h (+8/-8)
src/logic/widelands_geometry_io.cc (+2/-2)
src/logic/worker.cc (+14/-14)
src/logic/worker.h (+1/-1)
src/map_io/s2map.cc (+5/-5)
src/map_io/widelands_map_building_data_packet.cc (+1/-1)
src/map_io/widelands_map_buildingdata_data_packet.cc (+10/-10)
src/map_io/widelands_map_extradata_data_packet.cc (+1/-1)
src/map_io/widelands_map_flagdata_data_packet.cc (+4/-4)
src/map_io/widelands_map_players_messages_data_packet.cc (+5/-5)
src/map_io/widelands_map_players_view_data_packet.cc (+10/-10)
src/map_io/widelands_map_road_data_packet.cc (+1/-1)
src/map_io/widelands_map_roaddata_data_packet.cc (+10/-10)
src/map_io/widelands_map_saver.cc (+1/-1)
src/map_io/widelands_map_scripting_data_packet.cc (+1/-1)
src/network/internet_gaming.cc (+1/-1)
src/network/nethost.cc (+5/-5)
src/network/network.cc (+1/-1)
src/profile/profile.cc (+10/-10)
src/scripting/c_utils.cc (+5/-5)
src/scripting/lua_bases.cc (+11/-11)
src/scripting/lua_game.cc (+8/-8)
src/scripting/lua_globals.cc (+2/-2)
src/scripting/lua_map.cc (+3/-3)
src/scripting/lua_table.h (+1/-1)
src/scripting/lua_ui.cc (+3/-3)
src/scripting/scripting.cc (+1/-1)
src/sound/sound_handler.cc (+6/-6)
src/ui_basic/button.cc (+7/-7)
src/ui_basic/checkbox.cc (+6/-6)
src/ui_basic/editbox.cc (+3/-3)
src/ui_basic/listselect.cc (+5/-5)
src/ui_basic/multilineeditbox.cc (+1/-1)
src/ui_basic/multilinetextarea.cc (+1/-1)
src/ui_basic/panel.cc (+19/-19)
src/ui_basic/progresswindow.cc (+1/-1)
src/ui_basic/slider.cc (+16/-16)
src/ui_basic/table.cc (+4/-4)
src/ui_basic/unique_window.cc (+1/-1)
src/ui_basic/window.cc (+27/-27)
src/ui_fsmenu/editor_mapselect.cc (+4/-4)
src/ui_fsmenu/internet_lobby.cc (+1/-1)
src/ui_fsmenu/intro.cc (+1/-1)
src/ui_fsmenu/launch_spg.cc (+2/-2)
src/ui_fsmenu/mapselect.cc (+5/-5)
src/ui_fsmenu/netsetup_lan.cc (+1/-1)
src/ui_fsmenu/options.cc (+5/-5)
src/wlapplication.cc (+10/-10)
src/wui/actionconfirm.cc (+17/-17)
src/wui/building_statistics_menu.cc (+11/-11)
src/wui/buildingwindow.cc (+9/-9)
src/wui/chat_msg_layout.cc (+2/-2)
src/wui/encyclopedia_window.cc (+2/-2)
src/wui/fieldaction.cc (+11/-11)
src/wui/game_main_menu.cc (+2/-2)
src/wui/game_message_menu.cc (+2/-2)
src/wui/game_objectives_menu.cc (+3/-3)
src/wui/game_options_sound_menu.cc (+6/-6)
src/wui/general_statistics_menu.cc (+1/-1)
src/wui/interactive_base.cc (+24/-15)
src/wui/interactive_player.cc (+2/-2)
src/wui/mapview.cc (+3/-3)
src/wui/mapviewpixelfunctions.cc (+1/-1)
src/wui/overlay_manager.cc (+10/-10)
src/wui/plot_area.cc (+1/-1)
src/wui/productionsitewindow.cc (+5/-0)
src/wui/shipwindow.cc (+2/-2)
src/wui/transport_ui.cc (+2/-2)
src/wui/waresdisplay.cc (+1/-1)
src/wui/waresqueuedisplay.cc (+5/-5)
tags: | added: cleanups lowhangingfruit |
Changed in widelands: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in widelands: | |
assignee: | nobody → GunChleoc (gunchleoc) |
Changed in widelands: | |
status: | Confirmed → In Progress |
Changed in widelands: | |
status: | In Progress → Fix Committed |
Changed in widelands: | |
milestone: | none → build19-rc1 |
Changed in widelands: | |
assignee: | GunChleoc (gunchleoc) → nobody |
Changed in widelands: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Fixed in build19-rc1.