Re: [Widelands-dev] coding question (pointers, upcasting ....)

2015-06-25 Thread Fòram na Gàidhlig
P.S. back() returns an element and takes an empty argument. Are you looking for push_back? http://www.cplusplus.com/reference/vector/vector/ Sgrìobh Tibor Bamhor na leanas 25/06/2015 aig 14:36: > Hi, > > I am searching for near bobs and putting them to > > std::vector own_nearby; > > then it

Re: [Widelands-dev] coding question (pointers, upcasting ....)

2015-06-25 Thread Fòram na Gàidhlig
Upcast does not change the const/pointer/reference types, just the class type. From this code snippet, I can't tell where the const or & comes from. Sgrìobh Tibor Bamhor na leanas 25/06/2015 aig 14:36: > Hi, > > I am searching for near bobs and putting them to > > std::vector own_nearby; > >

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1454371 into lp:widelands

2015-06-25 Thread GunChleoc
I have set the bug back to "In progress" so we won't forget. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1454371/+merge/261375 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1454371 into lp:widelands. ___

[Widelands-dev] coding question (pointers, upcasting ....)

2015-06-25 Thread Tibor Bamhor
Hi, I am searching for near bobs and putting them to std::vector own_nearby; then iterate over it and if the bob is soldier (and meets some other requirements) I need to put it to std::vector defending_soldiers; The relevant part of code is: for (Bob * own : own_nearby) { if (upcast(Soldier,

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1454371 into lp:widelands

2015-06-25 Thread TiborB
Oh, we are talking about messages, and not notifications - then no impact on AI -- https://code.launchpad.net/~widelands-dev/widelands/bug-1454371/+merge/261375 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1454371 into lp:widelan

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1454371 into lp:widelands

2015-06-25 Thread SirVer
No need to revert I'd say. It should be a simple fix. There is just an unexpected message now send before the expedition ready message. > Am 25.06.2015 um 10:30 schrieb GunChleoc : > > The error sounds familiar - I seem to remember fixing it someplace before, > but not where. Since I don't h

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1454371 into lp:widelands

2015-06-25 Thread GunChleoc
The error sounds familiar - I seem to remember fixing it someplace before, but not where. Since I don't have access to my development machine right now, I can't track this down. For testing purposes, you can get rid of the latest merge by: bzr revert -r7478 Then recompile & run the test suite.