--- Log opened Wed Apr 26 00:00:55 2017 20170426 00:09:04-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170426 00:09:36-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170426 00:12:09-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 00:16:52-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 255 seconds] 20170426 00:17:48-!- RatArmy_ [~ratarmy@om126211120087.13.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170426 00:22:50< gfgtdf> vultraz_iOS: i also added a bool has_team() function to display_context in my commit. 20170426 00:23:19< gfgtdf> vultraz_iOS: wait my textbox was at wrong scolling position quite possible that thi issue is already solved 20170426 00:27:05-!- RatArmy_ [~ratarmy@om126211120087.13.openmobile.ne.jp] has joined #wesnoth-dev 20170426 01:00:15-!- Polsaker [~Polsaker@donger/wielder/Polsaker] has quit [Quit: No Ping reply in 180 seconds.] 20170426 01:02:28-!- Polsaker [~Polsaker@donger/wielder/Polsaker] has joined #wesnoth-dev 20170426 01:02:31-!- gfgtdf [~chatzilla@x4e36388b.dyn.telefonica.de] has quit [Quit: ChatZilla 0.9.93 [Firefox 53.0/20170413192749]] 20170426 01:05:28-!- RatArmy_ [~ratarmy@om126211120087.13.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170426 01:07:38-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170426 01:08:10-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170426 01:32:18-!- RatArmy_ [~ratarmy@om126211120087.13.openmobile.ne.jp] has joined #wesnoth-dev 20170426 01:32:53< vultraz_iOS> blah 20170426 01:32:54-!- RatArmy_ [~ratarmy@om126211120087.13.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170426 01:32:59< vultraz_iOS> I've ended up doing more than i expected.. 20170426 01:33:28-!- RatArmy_ [~ratarmy@133.15.175.65] has joined #wesnoth-dev 20170426 01:33:28< celticminstrel> Okay? 20170426 01:51:24-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20170426 02:00:12-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170426 02:00:44-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170426 02:08:10-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20170426 02:09:44-!- atarocch [~atarocch@31.157.131.77] has joined #wesnoth-dev 20170426 02:13:48-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 02:20:58-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170426 02:28:55-!- irker179 [~irker@109.237.213.40] has quit [Quit: transmission timeout] 20170426 02:32:40-!- RatArmy_ [~ratarmy@133.15.175.65] has quit [Ping timeout: 240 seconds] 20170426 02:34:16-!- RatArmy_ [~ratarmy@om126211120087.13.openmobile.ne.jp] has joined #wesnoth-dev 20170426 02:34:47-!- atarocch [~atarocch@31.157.131.77] has quit [Remote host closed the connection] 20170426 02:34:52-!- RatArmy_ [~ratarmy@om126211120087.13.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170426 02:42:05-!- deathisundead [~quassel@unaffiliated/the-unforgiven/x-8713611] has quit [Read error: Connection reset by peer] 20170426 02:43:23< vultraz_iOS> ugh 20170426 02:43:31< vultraz_iOS> A THOUSAND CURSES UPON CONSTNESS 20170426 02:43:49< celticminstrel> Why? 20170426 02:44:04< vultraz_iOS> because one needs to respect it 20170426 02:44:13< Aginor> it's the worst 20170426 02:44:17< Aginor> having to do things properly 20170426 02:44:22< vultraz_iOS> yes 20170426 02:45:26< vultraz_iOS> it would be nice if there were an auto_const feature 20170426 02:47:20< celticminstrel> What would that even be. 20170426 02:48:23< vultraz_iOS> a function declared auto_const would return a const version of its retval if being assigned to a const lvalue, and a non-const version otherwise. 20170426 02:49:30< celticminstrel> Uhhh. 20170426 02:49:56< celticminstrel> TBH, I don't see the point. It's only a couple extra lines to have a separate const version. 20170426 02:50:09< celticminstrel> Since one version can easily defer to the other. 20170426 02:50:31-!- RatArmy_ [~ratarmy@om126211120087.13.openmobile.ne.jp] has joined #wesnoth-dev 20170426 02:52:32< vultraz_iOS> yes, but imagine you have a function returning non-const T called get() that comprises of return bar(); Bar returns a const T. instead of adding 2 versions of each function, you could declare both auto_const 20170426 02:52:34-!- RatArmy_ [~ratarmy@om126211120087.13.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170426 02:53:10< celticminstrel> Technically speaking, there's actually no such thing as a "const function" 20170426 02:53:21< celticminstrel> This is why you can't append const to a non-membet function. 20170426 02:54:10< celticminstrel> If you have "struct X { void f() const; };", that's basically equivalent to "struct X {}; void f(const X* this);" 20170426 02:54:29< celticminstrel> Especially given the new unified function-call syntax (I don't remember if that was C++14 or C++17 though). 20170426 02:54:53< celticminstrel> IOW, "const' isn't annotating the function itself, it's annotating the implicit "this" argument. 20170426 02:55:15-!- deathisundead [~quassel@unaffiliated/the-unforgiven/x-8713611] has joined #wesnoth-dev 20170426 02:56:24< celticminstrel> In any case, I don't think it's actually possible to implement what you describe as auto_const in any general, sensible way. It may not always be the case that the const function returns a const value and the non-const function returns a non-const value, for example. 20170426 02:56:53< celticminstrel> If it really bugs you, you could probably macro it. 20170426 03:01:36 * celticminstrel even started thinking about how that would be done, but gave up. I think the nicest way would require some template helpers. 20170426 03:23:11-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has joined #wesnoth-dev 20170426 03:27:43-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has quit [Remote host closed the connection] 20170426 03:34:59-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has joined #wesnoth-dev 20170426 03:36:01-!- DeFender [~DeFender1@46-116-4-88.bb.netvision.net.il] has joined #wesnoth-dev 20170426 03:38:56-!- DeFender1031 [~DeFender1@46-116-90-83.bb.netvision.net.il] has quit [Ping timeout: 260 seconds] 20170426 03:46:42-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has quit [Remote host closed the connection] 20170426 03:56:50< celticminstrel> Oh yeah, I guess the thing about leadership/backstab needs to be mentioned in compatibility-breaking changes? 20170426 03:57:09< celticminstrel> The fact that you need delayed_variable_substitution in order to add it via an [object] in an event. 20170426 04:07:26-!- RatArmy_ [~ratarmy@om126234121128.16.openmobile.ne.jp] has joined #wesnoth-dev 20170426 04:09:51-!- RatArmy_ [~ratarmy@om126234121128.16.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170426 04:10:57-!- RatArmy_ [~ratarmy@133.15.175.65] has joined #wesnoth-dev 20170426 04:19:06-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has joined #wesnoth-dev 20170426 04:21:38-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has quit [Remote host closed the connection] 20170426 04:25:33-!- RatArmy_ [~ratarmy@133.15.175.65] has quit [Read error: Connection reset by peer] 20170426 04:25:41-!- RatArmy_ [~ratarmy@om126234121128.16.openmobile.ne.jp] has joined #wesnoth-dev 20170426 04:25:58-!- RatArmy_ [~ratarmy@om126234121128.16.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170426 04:26:37-!- RatArmy_ [~ratarmy@133.15.175.65] has joined #wesnoth-dev 20170426 04:31:16< celticminstrel> I've added it to zookeeper's draft post for now. 20170426 04:32:28< celticminstrel> Oh right! The teleport thing! 20170426 04:34:26< celticminstrel> Added that to the draft post too. I'll add other things too if they come up while testing my campaign in 1.13. 20170426 04:47:08< vultraz_iOS> heh 20170426 04:47:36< vultraz_iOS> you can't make a base class take a reference to a member of a dervived class 20170426 04:47:38< vultraz_iOS> derived 20170426 04:50:33< celticminstrel> Why not? 20170426 04:50:47< celticminstrel> I think it should be possible. 20170426 04:51:03< celticminstrel> Of course, it wouldn't be possible to define that function inline in the class body, though. 20170426 04:51:29< celticminstrel> Admittedly, if you're trying to do it, it's somewhat suspect, but... 20170426 04:53:10-!- RatArmy_ [~ratarmy@133.15.175.65] has quit [Ping timeout: 240 seconds] 20170426 05:01:41-!- deathisundead [~quassel@unaffiliated/the-unforgiven/x-8713611] has quit [Ping timeout: 260 seconds] 20170426 05:17:03< vultraz_iOS> not sure what I'm doing anymore 20170426 05:17:38-!- RatArmy_ [~ratarmy@om126234121128.16.openmobile.ne.jp] has joined #wesnoth-dev 20170426 05:18:23< celticminstrel> That's not good. You should stop and try to remember. 20170426 05:18:25-!- RatArmy_ [~ratarmy@om126234121128.16.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170426 05:18:34-!- RatArmy_ [~ratarmy@133.15.175.65] has joined #wesnoth-dev 20170426 05:19:01< vultraz_iOS> i was trying to make a common class to implement the getters involved with the game board 20170426 05:19:36< celticminstrel> So basically you're trying to reinvent display_context? 20170426 05:19:57< vultraz_iOS> it seems perhaps so 20170426 05:20:20< celticminstrel> Would eg game_lua_kernel extend that theoretical class? 20170426 05:20:36< vultraz_iOS> though I was going to implement in terms of game_data.. 20170426 05:20:38< vultraz_iOS> yes 20170426 05:20:46< celticminstrel> Then, display_context_proxy 20170426 05:20:56< celticminstrel> Construct it with a reference to a display_context. 20170426 05:21:08< celticminstrel> And implement the functions to forward all requests to the other display_context? 20170426 05:21:16< vultraz_iOS> yes 20170426 05:21:19< vultraz_iOS> i was going to do that 20170426 05:21:31< celticminstrel> Okay, cool. 20170426 05:21:33< vultraz_iOS> then i noticed there is also some duplication regarding the game_board stuff.. 20170426 05:21:42< celticminstrel> The what stuff? 20170426 05:21:47< vultraz_iOS> and game_data 20170426 05:21:52< celticminstrel> Sigh. 20170426 05:22:01< vultraz_iOS> wfhweiuhdioewhdh fj239ijd9j 20170426 05:22:04< vultraz_iOS> PAGEANT 20170426 05:22:07< vultraz_iOS> Y U CRASH 20170426 05:22:26-!- Greg-Boggs [~greg_bogg@2601:1c2:f00:9780:24c8:71e6:ad7f:5e66] has joined #wesnoth-dev 20170426 05:22:30< celticminstrel> Trying to remove all code duplication in one blow is probably not a good idea? 20170426 05:22:53< vultraz_iOS> perhaps, yes 20170426 05:23:04< vultraz_iOS> i should back up a bit.. 20170426 05:23:43< celticminstrel> And sometimes you probably need to just accept a little boilerplate. 20170426 05:24:48< Aginor> the facade pattern? 20170426 05:25:18< vultraz_iOS> the what now? 20170426 05:27:12-!- Greg-Boggs [~greg_bogg@2601:1c2:f00:9780:24c8:71e6:ad7f:5e66] has quit [Ping timeout: 260 seconds] 20170426 05:31:09< celticminstrel> Aginor: Would that be a little like this? https://github.com/wesnoth/wesnoth/blob/master/src/ai/formula/function_table.cpp#L55 20170426 05:32:21 * celticminstrel looked up "facade pattern" on Wikipedia and also read the page linked from its references, but still doesn't quite get it... 20170426 05:34:11-!- celticminstrel is now known as celmin|sleep 20170426 05:34:33< Aginor> I think I meant the decorator pattern 20170426 05:34:37-!- Greg-Boggs [~greg_bogg@2601:1c2:f00:9780:24c8:71e6:ad7f:5e66] has joined #wesnoth-dev 20170426 05:35:40< Aginor> https://en.wikipedia.org/wiki/Decorator_pattern 20170426 05:35:52< Aginor> that'd also fit in with celmin|sleep's code example 20170426 05:36:01< celmin|sleep> It would? 20170426 05:36:42< Aginor> although I guess it depends a bit on the use case 20170426 05:36:53< Aginor> if you want multiple classes to look the same, it's the decorator 20170426 05:37:02< celmin|sleep> The decorator pattern sounds exactly like how Python decorators look... 20170426 05:37:05< celmin|sleep> ^work 20170426 05:37:17< Aginor> if you're aggregating together functionality from the larger set, it's facade :D 20170426 05:37:31< Aginor> celmin|sleep: I think the naming there is not conincidental 20170426 05:37:54< celmin|sleep> But... the code I linked doesn't seem to be how Python decorators work? 20170426 05:38:12< Aginor> I admittedly didn't read the code very much 20170426 05:38:35< Aginor> I'm in the middle of other things so I just threw out a random comment that seemed somewhat relevant 20170426 05:38:39< Aginor> I may have been wrong 20170426 05:38:43< celmin|sleep> unit_adaptor allows two unrelated types to be treated the same for certain purposes. 20170426 05:39:09< celmin|sleep> Well, technically they are related types, but I mean not related by any inheritance. 20170426 05:39:47< celmin|sleep> I said it sounds exactly like Python decorators, but reading more closely, it seems slightly different maybe...? 20170426 05:40:04< Aginor> https://wiki.python.org/moin/PythonDecorators#What_is_a_Decorator 20170426 05:40:08< Aginor> looks like it 20170426 05:40:44-!- zookeeper [zookeeper@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20170426 05:45:57< vultraz_iOS> ugh 20170426 05:46:00< vultraz_iOS> looks like I will need... 20170426 05:46:04< vultraz_iOS> const_clone 20170426 05:46:21< celmin|sleep> Why is that ugh? 20170426 05:46:49< vultraz_iOS> i guess not ugh 20170426 05:46:52< Aginor> what are you cloning in the first place? 20170426 05:47:06< Aginor> why not just hold a reference? 20170426 05:47:10-!- mjs-de [~mjs-de@x4e31b671.dyn.telefonica.de] has joined #wesnoth-dev 20170426 05:47:37< vultraz_iOS> there's one place where the reference i need to pass in is const.. 20170426 05:48:46< Aginor> yes? And you want to make changes to it? 20170426 05:51:30< vultraz_iOS> oh this is just too complicated 20170426 05:51:57< celmin|sleep> Aginor: const_clone is a template metafunction that copies the constness of one type to another type. 20170426 05:52:06< celmin|sleep> So, it's not cloning anything. 20170426 05:52:13< vultraz_iOS> the current design is hacky - utilizing friend declarations to get into the internals of other classes to avoid const getters 20170426 05:52:32< celmin|sleep> That's not hacky. That's what friend declarations are for. 20170426 05:52:38< vultraz_iOS> speaking of which, I should add a template alias for const_clone... 20170426 05:52:45< celmin|sleep> Eh? 20170426 05:53:01< vultraz_iOS> celmin|sleep: why do 5 classes need to be friends of game_board :| 20170426 05:53:19< celmin|sleep> If you mean so you don't have to use ::type, I think there's not much point, because ::type is kinda an indication that it's a template metafunction. 20170426 05:53:32< celmin|sleep> I have no idea why 5 classes need to be friends of game_board. Does it matter that much? 20170426 05:53:57< vultraz_iOS> *sigh* 20170426 05:55:49-!- mjs-de [~mjs-de@x4e31b671.dyn.telefonica.de] has quit [Remote host closed the connection] 20170426 06:01:55-!- RatArmy_ [~ratarmy@133.15.175.65] has quit [Ping timeout: 245 seconds] 20170426 06:14:53-!- RatArmy_ [~ratarmy@om126234121128.16.openmobile.ne.jp] has joined #wesnoth-dev 20170426 06:17:33-!- RatArmy_ [~ratarmy@om126234121128.16.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170426 06:31:54-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 260 seconds] 20170426 06:37:46-!- JyrkiVesterinen [~JyrkiVest@85.76.67.43] has joined #wesnoth-dev 20170426 06:53:27-!- RatArmy_ [~ratarmy@om126234121128.16.openmobile.ne.jp] has joined #wesnoth-dev 20170426 06:56:01-!- RatArmy_ [~ratarmy@om126234121128.16.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170426 07:26:24-!- RatArmy_ [~ratarmy@om126234121128.16.openmobile.ne.jp] has joined #wesnoth-dev 20170426 07:30:16-!- RatArmy_ [~ratarmy@om126234121128.16.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170426 07:30:38-!- RatArmy_ [~ratarmy@133.15.175.65] has joined #wesnoth-dev 20170426 07:35:32-!- RatArmy_ [~ratarmy@133.15.175.65] has quit [Ping timeout: 260 seconds] 20170426 07:36:38-!- RatArmy_ [~ratarmy@om126234121128.16.openmobile.ne.jp] has joined #wesnoth-dev 20170426 07:41:24-!- RatArmy_ [~ratarmy@om126234121128.16.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170426 08:14:02-!- Greg-Boggs [~greg_bogg@2601:1c2:f00:9780:24c8:71e6:ad7f:5e66] has quit [Remote host closed the connection] 20170426 08:17:25-!- RatArmy_ [~ratarmy@om126234121128.16.openmobile.ne.jp] has joined #wesnoth-dev 20170426 08:37:08-!- Appleman1234 [~Appleman1@pl6322.ag1212.nttpc.ne.jp] has quit [Ping timeout: 260 seconds] 20170426 08:51:55-!- RatArmy_ [~ratarmy@om126234121128.16.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170426 09:01:18-!- Appleman1234 [~Appleman1@pl8501.ag1212.nttpc.ne.jp] has joined #wesnoth-dev 20170426 09:14:59-!- sevu [~Unknown@141.57.58.113] has joined #wesnoth-dev 20170426 09:15:45-!- JyrkiVesterinen [~JyrkiVest@85.76.67.43] has quit [Quit: .] 20170426 09:24:35-!- Appleman1234 [~Appleman1@pl8501.ag1212.nttpc.ne.jp] has quit [Ping timeout: 240 seconds] 20170426 09:41:28-!- JyrkiVesterinen [~JyrkiVest@85.76.67.43] has joined #wesnoth-dev 20170426 10:35:27< zookeeper> durr. spent a lot of time trying to figure out what's wrong with my WML before i realized that [have_unit] only matches >0hp units. 20170426 10:37:55< DeFender> see? I blame WML for that, not you. WML stuff seems to have a lot of automatic behaviors that are not always intuitive. 20170426 10:43:37-!- sevu [~Unknown@141.57.58.113] has quit [Remote host closed the connection] 20170426 10:46:59< zookeeper> most things do :J 20170426 10:51:12< DeFender> Eh, maybe. 20170426 10:51:54< DeFender> I tend to prefer things that give options in any case that might be ambiguous, and use sane defaults... but I'm just a crazy idealist, so... 20170426 10:54:26< zookeeper> sure, everyone does. 20170426 11:17:49-!- vultraz_iOS [uid24821@wesnoth/developer/vultraz] has quit [Quit: Connection closed for inactivity] 20170426 11:24:45-!- Appleman1234 [~Appleman1@pl51532.ag1212.nttpc.ne.jp] has joined #wesnoth-dev 20170426 11:37:37-!- gfgtdf [~chatzilla@x4e3631e9.dyn.telefonica.de] has joined #wesnoth-dev 20170426 11:51:20-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170426 11:55:11-!- RatArmy_ [~ratarmy@om126200120038.15.openmobile.ne.jp] has joined #wesnoth-dev 20170426 12:19:45-!- RatArmy_ [~ratarmy@om126200120038.15.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170426 12:31:21-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170426 12:31:54-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170426 12:59:38-!- RatArmy_ [~ratarmy@om126200120038.15.openmobile.ne.jp] has joined #wesnoth-dev 20170426 13:27:49-!- RatArmy_ [~ratarmy@om126200120038.15.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170426 14:04:31-!- RatArmy_ [~ratarmy@om126200120038.15.openmobile.ne.jp] has joined #wesnoth-dev 20170426 14:20:27-!- RatArmy_ [~ratarmy@om126200120038.15.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170426 14:21:31-!- gfgtdf [~chatzilla@x4e3631e9.dyn.telefonica.de] has quit [Quit: ChatZilla 0.9.93 [Firefox 53.0/20170413192749]] 20170426 14:22:25-!- RatArmy_ [~ratarmy@126.200.120.38] has joined #wesnoth-dev 20170426 14:40:54-!- celmin|sleep is now known as celticminstrel 20170426 14:49:53-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has joined #wesnoth-dev 20170426 15:02:35-!- JyrkiVesterinen [~JyrkiVest@85.76.67.43] has quit [Quit: .] 20170426 15:07:52-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has quit [Remote host closed the connection] 20170426 15:08:36-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has joined #wesnoth-dev 20170426 15:20:11-!- RatArmy_ [~ratarmy@126.200.120.38] has quit [Read error: Connection reset by peer] 20170426 15:21:00-!- RatArmy_ [~ratarmy@om126200120038.15.openmobile.ne.jp] has joined #wesnoth-dev 20170426 15:25:06-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has quit [Remote host closed the connection] 20170426 15:45:24-!- Kwandulin [~Kwandulin@p200300760F6D800181A4F6B54819CCB6.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170426 16:08:48-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 16:09:01-!- esr [~esr@wesnoth/developer/esr] has quit [Quit: WeeChat 1.4] 20170426 16:12:57-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 240 seconds] 20170426 16:40:31-!- JyrkiVesterinen [~jyrki@89-166-112-166.bb.dnainternet.fi] has joined #wesnoth-dev 20170426 16:41:09< JyrkiVesterinen> Hmm, on GNU/Linux I can reproduce the "credits disappear completely" bug. 20170426 16:56:13< DeFender> Eh, who needs credits anyway? 20170426 16:56:48-!- gfgtdf [~chatzilla@x4e3631e9.dyn.telefonica.de] has joined #wesnoth-dev 20170426 16:57:14< JyrkiVesterinen> The "credits cut halfway through" variant of the bug is the best. The authors of the last campaigns don't need that visibility anyway. :P 20170426 16:59:06< gfgtdf> somehow with my por #997 the game detects too many [side]s, meaing it somehow add a rnadom number of side to scenarios 20170426 16:59:56< gfgtdf> but i can see how: 1) commit 1+2 shodul oynl effect code that happens after scneario is initilized, and commit 3) shodul do nothign unless it is compiles with std=c++14 which travis by default doesn't do 20170426 16:59:59< gfgtdf> can't 20170426 17:20:37-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 17:30:10-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170426 17:31:30< zookeeper> gfgtdf, i don't understand what was going on last night when i was testing that die event stuff i mentioned. it works just fine now... with the exact same code. 20170426 17:32:13-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 17:35:45-!- vultraz_iOS [uid24821@wesnoth/developer/vultraz] has joined #wesnoth-dev 20170426 17:36:46< zookeeper> there's some other weird stuff going on too, maybe a reboot will help -.- 20170426 17:36:50-!- zookeeper [zookeeper@wesnoth/developer/zookeeper] has quit [] 20170426 17:39:51-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170426 17:40:28< DeFender> That seems unlikely. 20170426 17:41:19-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 17:42:02-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20170426 17:45:57-!- deathisundead [~quassel@c-73-144-114-234.hsd1.mi.comcast.net] has joined #wesnoth-dev 20170426 17:45:57-!- deathisundead [~quassel@c-73-144-114-234.hsd1.mi.comcast.net] has quit [Changing host] 20170426 17:45:57-!- deathisundead [~quassel@unaffiliated/the-unforgiven/x-8713611] has joined #wesnoth-dev 20170426 17:50:05< gfgtdf> zookeeper: i'm not arae of anjy changes related to 'die' evens other than the "[endlevel] no longer silently kills 0-hp units" 20170426 17:51:00< gfgtdf> zookeeper: alos note that usually each coide that kills units do implement event fireing on their own, so it could for example be possibel that whether the promary unit is removed before the event has fired depends on how the unit was killed 20170426 17:51:12< gfgtdf> zookeeper: meaning whtehr it was done by combat, by events, or by debug kill 20170426 17:53:50-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170426 17:56:34-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 18:11:52-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170426 18:17:34-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 18:21:59< vultraz_iOS> celticminstrel: do you think d_c should have both const and non-const virtual getters 20170426 18:22:20< vultraz_iOS> celticminstrel: or perhaps non-const virtuals and const non-virtuals using const_cast? 20170426 18:22:21< celticminstrel> Probably not. 20170426 18:22:46< celticminstrel> The latter seems better, though I don't like using const_cast... 20170426 18:23:15< celticminstrel> But, well, it doesn't actually compromise const safety in this case, provided the virtual overrides simply return the value that exists like they're supposed to. 20170426 18:23:46< gfgtdf> vultraz_iOS: where doy ou need non-const versions ? 20170426 18:24:00< celticminstrel> Oh right, were they const to begin with? 20170426 18:24:18< vultraz_iOS> yes 20170426 18:24:35< celticminstrel> That raises the option of having the non-const getters use const_cast then. 20170426 18:24:47< vultraz_iOS> i read you're not supposed to do that? 20170426 18:25:10< vultraz_iOS> oh wait 20170426 18:25:17< gfgtdf> celticminstrel: then is sureely better ot have non-cont getters than to cast const aways by const_cast 20170426 18:25:19< vultraz_iOS> hm 20170426 18:25:19< vultraz_iOS> https://stackoverflow.com/questions/123758/how-do-i-remove-code-duplication-between-similar-const-and-non-const-member-func 20170426 18:25:23< celticminstrel> Well, you're not supposed to use const_cast if you can avoid it, sure. 20170426 18:26:25< gfgtdf> vultraz_iOS: well yes just add both i'd thoe functiosn are probabyl one-liners so it not really code dublication to have non-const version 20170426 18:26:37< gfgtdf> vultraz_iOS: but again: why do you need non-const version fo those functions to begin with ? 20170426 18:26:58< celticminstrel> [Apr 26@2:24:35pm] celticminstrel: That raises the option of having the non-const getters use const_cast then. 20170426 18:26:59< celticminstrel> Huh, Meyers actually recommends this? 20170426 18:27:21< celticminstrel> I want to read his explanation why now. 20170426 18:27:30< celticminstrel> Mind you, Meyers also recommends some rather silly things. 20170426 18:27:32< vultraz_iOS> (who is this meyers anyway) 20170426 18:27:53< celticminstrel> (There's a group of clang warnings based on his recommendations which are disabled by default.) 20170426 18:28:04< gfgtdf> vultraz_iOS: the display_const class, as the name szuggest, is a struct ot contain proxy data the game needs for displaying(drawing) the gamestate, and drawing shodul just not mutate the gamestate 20170426 18:28:22< celticminstrel> That's true. 20170426 18:28:31< celticminstrel> But uh, gfgtdf. 20170426 18:28:40< celticminstrel> Whatever else you want to call it, it's not a proxy object. 20170426 18:29:00< celticminstrel> (It's display_context, not display_const.) 20170426 18:29:17< celticminstrel> If it was a proxy object, it wouldn't be a base class. 20170426 18:29:53< gfgtdf> celticminstrel: ye maybe i püiked the wrong term, i just meant theat it doenst give you direct access to the gamestate/board functiosn itself. 20170426 18:30:07< celticminstrel> Looks like it is indeed correct for the non-const version to use the const_cast, rather than the other way around, vultraz_iOS 20170426 18:30:21< vultraz_iOS> i see 20170426 18:30:25< celticminstrel> Is that how we use const_cast elsewhere? Might want to double-check. 20170426 18:30:48 * celticminstrel assumes that this applies only to const_cast of this. 20170426 18:31:42< celticminstrel> I guess the reason it's correct is that it's simply casting something to const and back, so you know the thing being casted wasn't originally const. 20170426 18:31:53< gfgtdf> celticminstrel: note that that the other way around would also a require a const_cast for the this object if you since you usually call the non-const version from the const version. 20170426 18:32:26< celticminstrel> Yes, both ways require a const_cast. 20170426 18:33:18< celticminstrel> But if the const version calls the non-const version, and the non-const version actually modifies something, then that's bad. 20170426 18:33:47< celticminstrel> So you should never do it that way with virtual functions, where you may not have full control of both versions. 20170426 18:34:43< vultraz_iOS> gfgtdf: ok so basiclay im working on this https://github.com/Vultraz/wesnoth/commit/707da4c813c5134e56382bd09450ebc2db650b61 to give the appropriate getters to certain classes but w/o them having to define their own. problem is some classes like the lua kernel are declared friend to game_board (and there's a todo note to remove that) so they can access 20170426 18:34:43< vultraz_iOS> non-const versions of teams(), etc, w/o using a getter 20170426 18:36:12< celticminstrel> vultraz_iOS, gfgtdf: So then, it should be fine if all uses of the display_context (and its subclasses) in the context of drawing stuff are const, right? 20170426 18:36:41< celticminstrel> Also vultraz_iOS, please separate out the formatting changes from that commit. 20170426 18:36:51< vultraz_iOS> What formatting changes? 20170426 18:36:58< celticminstrel> src/menu_events.cpp 20170426 18:36:58< vultraz_iOS> To the ctor? 20170426 18:37:01< celticminstrel> The constructor. 20170426 18:37:15< gfgtdf> vultraz_iOS: hm mi dont realyl see th epont of that commit, i mean menu_handleralways has a game_board so why woudl you want to have a generic baselcass here? 20170426 18:37:38< celticminstrel> I guess to commit that separately you'd have to temporarily delete line 95. 20170426 18:38:09< celticminstrel> Somehow I expected display_context_proxy to inherit from display_context. 20170426 18:38:12< vultraz_iOS> Only point of the class is to provide getter functions w/o having to implement them in each class 20170426 18:38:33< celticminstrel> Also, you probably want to inherit only privately from display_context_proxy. 20170426 18:38:38< gfgtdf> vultraz_iOS: hmm rigth they arent even virtual i see 20170426 18:38:38< vultraz_iOS> celticminstrel: I had tried the other way around... how would that work ? 20170426 18:38:54< celticminstrel> Well, it probably wouldn't make any difference at all TBH. 20170426 18:39:18-!- prkc [~prkc@gateway/vpn/privateinternetaccess/prkc] has joined #wesnoth-dev 20170426 18:39:41< celticminstrel> Since the purpose of the proxy is simply to be able to call units() instead of board().units(). 20170426 18:39:55< gfgtdf> vultraz_iOS: but in both cases 'display_context_proxy' actuall owns a game_board coudl you jsut change it to take a game_board ? 20170426 18:40:05< celticminstrel> And oh huh, they're public in menu_events? That's surprising, but I suppose that means you can inherit publicly from display_context_proxy. 20170426 18:40:34< vultraz_iOS> gfgtdf: what? What you just said makes no sense 20170426 18:41:36< gfgtdf> vultraz_iOS: your 'display_context_proxy' class has a 'display_context&' member, but you always cll the ctor with a game_board object afaik 20170426 18:41:57< vultraz_iOS> Hmmm 20170426 18:42:02< vultraz_iOS> Hmmmmmmm 20170426 18:42:05< gfgtdf> vultraz_iOS: so i wonder why it has a generic 'display_context&' memeber if it coudl just have a 'game_board&' member 20170426 18:42:09< celticminstrel> I made commit comments. 20170426 18:42:23< vultraz_iOS> So actually I was originally going to implement this as game_data proxy 20170426 18:42:54< celticminstrel> Don't forget about the map_context, which is a display_context that is not a game_board. 20170426 18:42:57< vultraz_iOS> But anyway what you say is false since it takes a display context directly in reports.hpp 20170426 18:43:47< gfgtdf> vultraz_iOS: hmm ok 20170426 18:50:53-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170426 18:51:02-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 19:23:18-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170426 19:24:41-!- Kwandulin [~Kwandulin@p200300760F6D800181A4F6B54819CCB6.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20170426 19:31:37-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 19:31:39-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170426 19:32:22-!- JyrkiVesterinen [~jyrki@89-166-112-166.bb.dnainternet.fi] has quit [Quit: .] 20170426 19:50:06-!- deathisundead [~quassel@unaffiliated/the-unforgiven/x-8713611] has quit [Ping timeout: 260 seconds] 20170426 20:00:03-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 20:02:58-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Read error: Connection reset by peer] 20170426 20:03:02-!- Greg-Bog_ [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 21:07:17-!- heirecka [~heirecka@exherbo/developer/heirecka] has quit [Quit: Bye] 20170426 21:22:19-!- gfgtdf [~chatzilla@x4e3631e9.dyn.telefonica.de] has quit [Remote host closed the connection] 20170426 21:27:28-!- heirecka [~heirecka@exherbo/developer/heirecka] has joined #wesnoth-dev 20170426 21:40:55-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth-dev 20170426 22:14:03-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 240 seconds] 20170426 22:26:10-!- gfgtdf [~chatzilla@x4e3631e9.dyn.telefonica.de] has joined #wesnoth-dev 20170426 22:27:11-!- irker921 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20170426 22:27:11< irker921> wesnoth: gfgtdf wesnoth:master c41aafd96dfe / src/game_initialization/create_engine.cpp: fix memleak in scenario start https://github.com/wesnoth/wesnoth/commit/c41aafd96dfe618d35353701a65973ec7bcc610d 20170426 22:27:20< gfgtdf> matthiaskrgr: #25677 is fixed coud you please also test the other one ? 20170426 22:32:03-!- Greg-Bog_ [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170426 22:33:09-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 22:37:29-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170426 22:38:36< celticminstrel> ... 20170426 22:39:03< gfgtdf> ? 20170426 22:39:09< celticminstrel> Your commit confuses me. 20170426 22:39:22< gfgtdf> why that ? 20170426 22:39:37< gfgtdf> hmaybe the message isnt that exact 20170426 22:39:39-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 22:39:50< celticminstrel> preprocess_file returns.. a unique_ptr? 20170426 22:39:54< gfgtdf> yes 20170426 22:40:17-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170426 22:40:24< celticminstrel> So um... are you sure it's not destroyed by the time read is called? 20170426 22:40:30-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 22:40:35< gfgtdf> yes 20170426 22:40:50< celticminstrel> Oh? How do you know this? 20170426 22:41:10< gfgtdf> tempararies aren't destroed until the expression it appears in was executed 20170426 22:42:03< celticminstrel> Hmm, okay. 20170426 22:42:30< gfgtdf> otherwise calls like foo(const std::string&); foo("abc"); would also not work sicne a temporariyl std::strign is created 20170426 22:51:38-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170426 22:53:11-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 22:53:40-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170426 22:53:47-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 22:57:55-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170426 23:01:08-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20170426 23:11:46-!- atarocch [~atarocch@69.193.57.18] has joined #wesnoth-dev 20170426 23:29:28-!- RatArmy_ [~ratarmy@om126200120038.15.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170426 23:35:23-!- RatArmy_ [~ratarmy@om126200120038.15.openmobile.ne.jp] has joined #wesnoth-dev 20170426 23:41:24-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20170426 23:53:08-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170426 23:54:49-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev --- Log closed Thu Apr 27 00:00:11 2017