[Widelands-dev] [Merge] lp:~widelands-dev/widelands/const_portdock_fleet_and_ship_functions into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/const_portdock_fleet_and_ship_functions into lp:widelands. Commit message: Made as many functions as possible const in portdock, fleet and ship and followed the snowball effect Requested reviews: Widelands Developers (widelands-dev) For more details, see: https://code.launchpad.net/~widelands-dev/widelands/const_portdock_fleet_and_ship_functions/+merge/354301 const functions give the compiler more room for optimization. -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/const_portdock_fleet_and_ship_functions into lp:widelands. === modified file 'src/ai/defaultai_seafaring.cc' --- src/ai/defaultai_seafaring.cc 2018-08-16 16:10:43 + +++ src/ai/defaultai_seafaring.cc 2018-09-05 07:39:19 + @@ -126,7 +126,7 @@ for (const WarehouseSiteObserver& wh_obs : warehousesites) { if (wh_obs.bo->is(BuildingAttribute::kPort)) { ports_count += 1; - if (Widelands::PortDock* pd = wh_obs.site->get_portdock()) { + if (const Widelands::PortDock* pd = wh_obs.site->get_portdock()) { if (pd->expedition_started()) { expeditions_in_prep += 1; } === modified file 'src/economy/flag.cc' --- src/economy/flag.cc 2018-08-09 11:11:15 + +++ src/economy/flag.cc 2018-09-05 07:39:19 + @@ -967,7 +967,7 @@ flag.molog("BUG: flag_job_request_callback: worker not found in list\n"); } -void Flag::log_general_info(const Widelands::EditorGameBase& egbase) { +void Flag::log_general_info(const Widelands::EditorGameBase& egbase) const { molog("Flag at %i,%i\n", position_.x, position_.y); Widelands::PlayerImmovable::log_general_info(egbase); === modified file 'src/economy/flag.h' --- src/economy/flag.h 2018-08-09 11:11:15 + +++ src/economy/flag.h 2018-09-05 07:39:19 + @@ -163,7 +163,7 @@ void add_flag_job(Game&, DescriptionIndex workerware, const std::string& programname); - void log_general_info(const EditorGameBase&) override; + void log_general_info(const EditorGameBase&) const override; protected: bool init(EditorGameBase&) override; === modified file 'src/economy/fleet.cc' --- src/economy/fleet.cc 2018-04-07 16:59:00 + +++ src/economy/fleet.cc 2018-09-05 07:39:19 + @@ -324,11 +324,11 @@ return true; } -uint32_t Fleet::count_ships() { +uint32_t Fleet::count_ships() const { return ships_.size(); } -uint32_t Fleet::count_ships_heading_here(EditorGameBase& egbase, PortDock* port) { +uint32_t Fleet::count_ships_heading_here(EditorGameBase& egbase, PortDock* port) const { uint32_t ships_on_way = 0; for (uint16_t s = 0; s < ships_.size(); s += 1) { if (ships_[s]->get_destination(egbase) == port) { @@ -339,10 +339,10 @@ return ships_on_way; } -uint32_t Fleet::count_ports() { +uint32_t Fleet::count_ports() const { return ports_.size(); } -bool Fleet::get_act_pending() { +bool Fleet::get_act_pending() const { return act_pending_; } @@ -568,7 +568,7 @@ } } -bool Fleet::has_ports() { +bool Fleet::has_ports() const { return !ports_.empty(); } @@ -863,7 +863,7 @@ } } -void Fleet::log_general_info(const EditorGameBase& egbase) { +void Fleet::log_general_info(const EditorGameBase& egbase) const { MapObject::log_general_info(egbase); molog("%" PRIuS " ships and %" PRIuS " ports\n", ships_.size(), ports_.size()); === modified file 'src/economy/fleet.h' --- src/economy/fleet.h 2018-04-16 07:03:12 + +++ src/economy/fleet.h 2018-09-05 07:39:19 + @@ -92,17 +92,17 @@ void remove_ship(EditorGameBase& egbase, Ship* ship); void add_port(EditorGameBase& egbase, PortDock* port); void remove_port(EditorGameBase& egbase, PortDock* port); - bool has_ports(); + bool has_ports() const; - void log_general_info(const EditorGameBase&) override; + void log_general_info(const EditorGameBase&) const override; bool get_path(PortDock& start, PortDock& end, Path& path); void add_neighbours(PortDock& pd, std::vector& neighbours); - uint32_t count_ships(); - uint32_t count_ships_heading_here(EditorGameBase& egbase, PortDock* port); - uint32_t count_ports(); - bool get_act_pending(); + uint32_t count_ships() const; + uint32_t count_ships_heading_here(EditorGameBase& egbase, PortDock* port) const; + uint32_t count_ports() const; + bool get_act_pending() const; protected: void act(Game&, uint32_t data) override; === modified file 'src/economy/portdock.cc' --- src/economy/portdock.cc 2018-04-16 07:03:12 + +++ src/economy/portdock.cc 2018-09-05 07:39:19 + @@ -384,10 +384,10 @@ /** * Return the number of wares or workers of the given type that are waiting at the dock. */ -uint32_t PortDock::count_waiting(WareWorker waretype, DescriptionIndex wareindex) { +uint32_t PortDock::count_waiting(WareWorker waretype, DescriptionIndex wareindex) const { uint32_t count = 0; - for (ShippingItem& shipping_item : waiting_) { + for (const ShippingItem& shipping_item : waiting_) { WareInstance* ware; Wo
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/appveyor_fix into lp:widelands
The Linux builds in Travis could not handle the new Boost header, while the Mac builds could. I think having a switch for the Boost versions is still a good idea. Document the changes needed for glbinding in the bug, call it "modernize glbinding" or something and retarget it to Build 21? I have already pushed a fix for the downgrading directly to trunk to get us going again with AppVeyor ASAP. -- https://code.launchpad.net/~widelands-dev/widelands/appveyor_fix/+merge/354160 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/appveyor_fix into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/appveyor_fix into lp:widelands
Continuous integration builds have changed state: Travis build 3896. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/424652169. Appveyor build 3694. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_appveyor_fix-3694. -- https://code.launchpad.net/~widelands-dev/widelands/appveyor_fix/+merge/354160 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/appveyor_fix into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/mines-worldsavior into lp:widelands
Continuous integration builds have changed state: Travis build 3897. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/424658912. Appveyor build 3695. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_mines_worldsavior-3695. -- https://code.launchpad.net/~widelands-dev/widelands/mines-worldsavior/+merge/350716 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/mines-worldsavior. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/shipyard_statistics into lp:widelands
Review: Approve LGTM :) We have to wait for your other branch before we can merge this though. -- https://code.launchpad.net/~widelands-dev/widelands/shipyard_statistics/+merge/354208 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1786613-10s-return-skipped. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/scout-compatibility into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/scout-compatibility into lp:widelands. Commit message: Remove savegame compatibility for scouts. Requested reviews: Widelands Developers (widelands-dev) For more details, see: https://code.launchpad.net/~widelands-dev/widelands/scout-compatibility/+merge/354345 This one got missed when I ripped out the savegame compatibility code. -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/scout-compatibility into lp:widelands. === modified file 'src/logic/map_objects/tribes/worker.cc' --- src/logic/map_objects/tribes/worker.cc 2018-08-09 11:11:15 + +++ src/logic/map_objects/tribes/worker.cc 2018-09-05 16:16:05 + @@ -2933,21 +2933,7 @@ const Map& map = game.map(); - if (scouts_worklist.empty()) { - // This routine assumes that scouts_worklist is not empty. There is one exception: - // First call to this routine after loading an old savegame. The least-invasive - // way to acquire old savegame compatibility was to simply ask the scout to go home early, - // under this special situation. Anybody reading this, - // TODO(kxq): Please remove this code block (and compatibility_2017 code from load routine) - // once Build 20 is out. Thanks. - log("Warning: sending scout home. Assuming the game was just started, from savegame, in " - "compatibility mode.\n"); - pop_task(game); - schedule_act(game, 10); - return; - } - - bool do_run = static_cast(state.ivar2 - game.get_gametime()) > 0; + const bool do_run = static_cast(state.ivar2 - game.get_gametime()) > 0; // do not pop; this function is called many times per run. struct PlaceToScout scoutat = scouts_worklist.back(); @@ -3016,12 +3002,8 @@ void Worker::Loader::load(FileRead& fr) { Bob::Loader::load(fr); try { - uint8_t packet_version = fr.unsigned_8(); - // TODO(kxq): Remove the compatibility_2017 code (and similars, dozen lines below) after B20 - // TODO(kxq): Also remove the code fragment from Worker::scout_update with compatibility_2017 - // in comment. - bool compatibility_2017 = 2 == packet_version; - if (packet_version == kCurrentPacketVersion || compatibility_2017) { + const uint8_t packet_version = fr.unsigned_8(); + if (packet_version == kCurrentPacketVersion) { Worker& worker = get(); location_ = fr.unsigned_32(); @@ -3032,14 +3014,7 @@ worker.transfer_ = new Transfer(dynamic_cast(egbase()), worker); worker.transfer_->read(fr, transfer_); } - unsigned veclen; - // TODO(kxq): Remove compatibility_2017 associated code from here and above, - // after build 20 has been released. - if (compatibility_2017) { -veclen = 0; - } else { -veclen = fr.unsigned_8(); - } + const unsigned veclen = fr.unsigned_8(); for (unsigned q = 0; q < veclen; q++) { if (fr.unsigned_8()) { const PlaceToScout gsw; ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/appveyor_fix into lp:widelands
ok I think I found a cool solution for glbinding as well. Let's wait for the CI results and then review please. Locally it took Glbinding 3 code and boost 1.66 code (had to downgrade this as I am on Win10) so in msys2 environment the switches are working. -- https://code.launchpad.net/~widelands-dev/widelands/appveyor_fix/+merge/354160 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/appveyor_fix into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/gdpr_1 into lp:widelands-website
kaputtnik has proposed merging lp:~widelands-dev/widelands-website/gdpr_1 into lp:widelands-website. Commit message: Removed google analytics and PayPal, make some fields optional in the contact form. Requested reviews: Widelands Developers (widelands-dev) Related bugs: Bug #1780536 in Widelands Website: "Add a GDPR (german: DSVGO) to the website" https://bugs.launchpad.net/widelands-website/+bug/1780536 For more details, see: https://code.launchpad.net/~widelands-dev/widelands-website/gdpr_1/+merge/354355 After long time absence, i wanted to restart with an easy thing :-) -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands-website/gdpr_1 into lp:widelands-website. === removed file 'mainpage/context_processors.py' --- mainpage/context_processors.py 2018-02-11 14:48:26 + +++ mainpage/context_processors.py 1970-01-01 00:00:00 + @@ -1,6 +0,0 @@ -from django.conf import settings - - -def settings_for_templates(request): -context = {'USE_GOOGLE_ANALYTICS': settings.USE_GOOGLE_ANALYTICS,} -return context === modified file 'mainpage/forms.py' --- mainpage/forms.py 2016-12-13 18:28:51 + +++ mainpage/forms.py 2018-09-05 19:48:01 + @@ -14,7 +14,7 @@ class ContactForm(forms.Form): -surname = forms.CharField(max_length=80) -forename = forms.CharField(max_length=80) +surname = forms.CharField(max_length=80, required=False) +forename = forms.CharField(max_length=80, required=False) email = forms.EmailField() inquiry = forms.CharField(widget=forms.Textarea) === modified file 'settings.py' --- settings.py 2018-05-12 14:01:09 + +++ settings.py 2018-09-05 19:48:01 + @@ -142,7 +142,6 @@ 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django_messages.context_processors.inbox', -'mainpage.context_processors.settings_for_templates', ], }, }, @@ -275,9 +274,6 @@ MAPS_PER_PAGE = 10 - -USE_GOOGLE_ANALYTICS = False - ## ## Recipient(s) who get an email if someone ## ## uses the form on legal notice page ## === modified file 'templates/base.html' --- templates/base.html 2018-02-11 14:48:26 + +++ templates/base.html 2018-09-05 19:48:01 + @@ -25,18 +25,6 @@
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/const_portdock_fleet_and_ship_functions into lp:widelands
Continuous integration builds have changed state: Travis build 3899. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/424681733. Appveyor build 3697. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_const_portdock_fleet_and_ship_functions-3697. -- https://code.launchpad.net/~widelands-dev/widelands/const_portdock_fleet_and_ship_functions/+merge/354301 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/const_portdock_fleet_and_ship_functions into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/shipyard_statistics into lp:widelands
Continuous integration builds have changed state: Travis build 3900. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/424720301. Appveyor build 3698. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_shipyard_statistics-3698. -- https://code.launchpad.net/~widelands-dev/widelands/shipyard_statistics/+merge/354208 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1786613-10s-return-skipped. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/scout-compatibility into lp:widelands
Continuous integration builds have changed state: Travis build 3901. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/424900021. Appveyor build 3699. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_scout_compatibility-3699. -- https://code.launchpad.net/~widelands-dev/widelands/scout-compatibility/+merge/354345 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/scout-compatibility into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/appveyor_fix into lp:widelands
Continuous integration builds have changed state: Travis build 3902. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/424998557. Appveyor build 3700. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_appveyor_fix-3700. -- https://code.launchpad.net/~widelands-dev/widelands/appveyor_fix/+merge/354160 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/appveyor_fix into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/mines-worldsavior into lp:widelands
Review: Needs Fixing The wares cannot be fixed without a bug overhaul of the production program code, and it's too late in the release cycle to do that now. The only alternative would be some really really ugly hacks, which I don't want to do. The problem is that the consumed wares are not in the same programs as the produced wares. I propose that we split off all the changes that don't create this problem into a new branch and merge that one. -- https://code.launchpad.net/~widelands-dev/widelands/mines-worldsavior/+merge/350716 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/mines-worldsavior. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/shipyard_statistics into lp:widelands
The mines_worldsavior branch is blocked. Can you create a fresh branch off trunk, so that we can merge this? -- https://code.launchpad.net/~widelands-dev/widelands/shipyard_statistics/+merge/354208 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1786613-10s-return-skipped. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1786613-10s-return-skipped into lp:widelands
The mines_worldsavior branch is blocked. Can you create a fresh branch off trunk with the changes that are independent of that branch, so that we can get them in for Build 20? -- https://code.launchpad.net/~widelands-dev/widelands/bug-1786613-10s-return-skipped/+merge/353514 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/mines-worldsavior. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp