← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/ferry into lp:widelands

 

CLang gives me some comppiler warnings:

src/economy/economy.cc:854:45: warning: loop variable 'r' has type 
    'const std::pair<Request *, uint32_t> &' 
    (aka 'const pair<Widelands::Request *, unsigned int> &') 
but is initialized with type  'std::__1::__map_iterator<std::__1::__tree_iterator<std::__1::__value_type<Widelands::Request *, unsigned int>, std::__1::__tree_node<std::__1::__value_type<Widelands::Request *, unsigned int>, void *> *, long> >::value_type' 
(aka 'pair<Widelands::Request *const, unsigned int>') 
resulting in a copy [-Wrange-loop-analysis]
          for (const std::pair<Request*, uint32_t>& r : open_requests) {
                                                          ^
../src/economy/economy.cc:854:8: note: use non-reference type 'std::pair<Request *, uint32_t>' (aka 'pair<Widelands::Request *, unsigned int>') to keep the copy or type 'const std::__1::__map_iterator<std::__1::__tree_iterator<std::__1::__value_type<Widelands::Request *, unsigned int>, std::__1::__tree_node<std::__1::__value_type<Widelands::Request *, unsigned int>, void *> *, long> >::value_type &' 
(aka 'const pair<Widelands::Request *const, unsigned int> &') to prevent copying
                for (const std::pair<Request*, uint32_t>& r : open_requests)

I think you need more const inside the declaration of r?

/src/wui/economy_options_window.cc:20:
../src/wui/economy_options_window.h:56:25: warning: private field 'type_' is not used 
[-Wunused-private-field]  Widelands::WareWorker type_;

You should see them in the automated builds, too
-- 
https://code.launchpad.net/~widelands-dev/widelands/ferry/+merge/351880
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/ferry.


References