--- Log opened Fri Aug 03 00:00:34 2018 20180803 00:44:03-!- sevu [~sevu@p5485581A.dip0.t-ipconnect.de] has quit [Quit: Verlassend] 20180803 00:58:21-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180803 00:58:27-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20180803 02:08:57-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180803 02:09:03-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20180803 02:10:35-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has quit [Ping timeout: 240 seconds] 20180803 02:11:42-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has joined #wesnoth-dev 20180803 04:13:03-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has quit [Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] 20180803 04:31:09-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180803 04:31:15-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20180803 04:59:25-!- valdar [~atarocch@37.177.21.182] has joined #wesnoth-dev 20180803 05:03:50-!- valdar_ [~atarocch@37.177.21.182] has joined #wesnoth-dev 20180803 05:04:03-!- valdar [~atarocch@37.177.21.182] has quit [Client Quit] 20180803 05:04:10-!- valdar_ [~atarocch@37.177.21.182] has quit [Client Quit] 20180803 05:05:15-!- valdar [~atarocch@37.177.21.182] has joined #wesnoth-dev 20180803 05:29:19-!- nullpotato [4ba8565f@gateway/web/freenode/ip.75.168.86.95] has joined #wesnoth-dev 20180803 05:30:00-!- gallaecio [~quassel@89.96.79.188.dynamic.jazztel.es] has joined #wesnoth-dev 20180803 05:34:34-!- nullpotato [4ba8565f@gateway/web/freenode/ip.75.168.86.95] has quit [Quit: Page closed] 20180803 05:47:48-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20180803 06:00:58-!- gallaecio [~quassel@89.96.79.188.dynamic.jazztel.es] has quit [Ping timeout: 265 seconds] 20180803 06:31:52-!- lilinitsy_ [~demonitsy@75-168-95-50.mpls.qwest.net] has joined #wesnoth-dev 20180803 07:05:34-!- Ohelig5 [~Ohelig@c-68-36-58-57.hsd1.mi.comcast.net] has joined #wesnoth-dev 20180803 07:07:01-!- Ohelig5 [~Ohelig@c-68-36-58-57.hsd1.mi.comcast.net] has quit [Read error: Connection reset by peer] 20180803 07:10:37-!- Whooa21 [~Whooa21@68-119-242-90.dhcp.sllv.mo.charter.com] has joined #wesnoth-dev 20180803 07:11:56-!- Whooa21 [~Whooa21@68-119-242-90.dhcp.sllv.mo.charter.com] has quit [Remote host closed the connection] 20180803 07:30:35-!- hiya11 [~hiya@138.229.208.205] has joined #wesnoth-dev 20180803 07:31:56-!- hiya11 [~hiya@138.229.208.205] has quit [Remote host closed the connection] 20180803 07:38:27-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20180803 07:49:44-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20180803 08:38:34-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 244 seconds] 20180803 08:54:25-!- irker440 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20180803 09:02:03-!- irker437 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20180803 09:48:57-!- behalebabo [~behalebab@unaffiliated/behalebabo] has quit [Ping timeout: 245 seconds] 20180803 10:12:41-!- vn971 [~vasya@94.158.103.15] has joined #wesnoth-dev 20180803 10:19:04-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180803 10:19:10-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20180803 10:42:32<+wesdiscordbot> @sevu I've added cwesnoth.cmd to steam build 20180803 11:23:22-!- snowolf5 [~snowolf@64.145.76.37] has joined #wesnoth-dev 20180803 11:24:07-!- snowolf5 [~snowolf@64.145.76.37] has quit [Remote host closed the connection] 20180803 11:41:27-!- Theking^27 [~Theking^@ool-2f1536dc.static.optonline.net] has joined #wesnoth-dev 20180803 11:43:09-!- Theking^27 [~Theking^@ool-2f1536dc.static.optonline.net] has quit [Remote host closed the connection] 20180803 12:03:48< vn971> Got a crash on 1.14. Have a savegame as well - from the point of view of the surviving player. This was in the logs: 20180803 12:03:48< vn971> wesnoth: src/actions/attack.cpp:398: battle_context::battle_context(const unit_map&, const map_location&, const map_location&, int, int, double, const combatant*, const unit*): Assertion `!defender_stats_ && !attacker_combatant_ && !defender_combatant_' failed. 20180803 12:13:51<+wesdiscordbot> Sounds like some kind of corner case where battle context creates statistics for the defender but not attacker. 20180803 12:14:01<+wesdiscordbot> Most likely a regression from https://github.com/wesnoth/wesnoth/commit/e8c7d722248332f6180c65993a7b5a3821b11b96 20180803 12:19:01-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180803 12:19:07-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20180803 12:39:04-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has joined #wesnoth-dev 20180803 12:42:09-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20180803 13:05:04-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has quit [Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] 20180803 13:37:50<+wesdiscordbot> What is the best way to save this PHP associative array in C++? array( 'iPhone4,1' => array( 'name' => 'iPhone 4S', 'screen_dpi' => 326, 'screen_width_px' => 640, 'screen_height_px' => 960, 'screen_width_pt' => 0, 'screen_height_pt' => 0, ), 'iPhone5,1' => array( 'name' => 'iPhone 5 (model A1428, AT&T/Canada)', 'screen_dpi' => 326, 20180803 13:37:50<+wesdiscordbot> 'screen_width_px' => 640, 'screen_height_px' => 1136, 'screen_width_pt' => 0, 'screen_height_pt' => 0, ), ); 20180803 13:38:46<+wesdiscordbot> how come you're not using []? 20180803 13:39:16<+wesdiscordbot> I'll need on one device access only one field. In PHP like this: echo(array_name['iPhone4,1']['name']); 20180803 13:39:44<+wesdiscordbot> @Vultraz in PHP or C++? 20180803 13:39:57<+wesdiscordbot> php 20180803 13:40:01<+wesdiscordbot> instead of array() 20180803 13:40:30<+wesdiscordbot> I do, but I wanted more people to recognise what I want 😃 20180803 13:41:04<+wesdiscordbot> in c++, it would basically be a double map 20180803 13:41:19<+wesdiscordbot> std::map> 20180803 13:44:39<+wesdiscordbot> there is mixed datatype 20180803 13:44:58<+wesdiscordbot> name is type string but rest is int 20180803 13:46:18<+wesdiscordbot> Assuming that every element is similar, it would be best to create a custom struct. struct phone_info { std::string name; int screen_dpi; int screen_width_px; int screen_height_px; double screen_width_pt; double screen_height_pt; } 20180803 13:57:27<+wesdiscordbot> Like this? cpp struct device_info { std::string name; int screen_dpi; int screen_width_px; int screen_height_px; double screen_width_pt; double screen_height_pt; device_info(std::string name, int screen_dpi, int screen_width_px, int screen_height_px, int screen_width_pt, int screen_height_pt) : name(name), screen_dpi(screen_dpi), screen_width_px(screen_width_px), 20180803 13:57:28<+wesdiscordbot> screen_height_px(screen_height_px), screen_width_pt(screen_width_pt), screen_height_pt(screen_height_pt) {} }; static std::map devices = { { "iPhone4,1", device_info("iPhone 4S", 326, 640, 960, 0, 0) }, }; 20180803 13:57:57<+wesdiscordbot> Yes, like that. 20180803 13:58:43<+wesdiscordbot> Although it's unfortunate that this way it's unclear what each number means (e.g. what 326 is). 20180803 14:06:14<+wesdiscordbot> cpp struct device_info { std::string name; int screen_dpi; int screen_width_px; int screen_height_px; double screen_width_pt; double screen_height_pt; }; static std::map devices = { { "iPhone4,1", { .name="iPhone 4S", .screen_dpi=326, .screen_width_px=640, .screen_height_px=960, .screen_width_pt=0, .screen_height_pt=0 } }, }; 20180803 14:07:29<+wesdiscordbot> But TBH, I don't know how to get name for example :( devices["iPhone7,1"]['name'] 20180803 14:07:50<+wesdiscordbot> That initialization example is nice (but requires C++20). 20180803 14:08:26<+wesdiscordbot> You can get the name with devices["iPhone4,1"].name 20180803 14:11:27-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 240 seconds] 20180803 14:12:21<+wesdiscordbot> C++ language dialect is set to C++11, that's why I got this error? 20180803 14:12:22<+wesdiscordbot> https://cdn.discordapp.com/attachments/259976436490829825/474942604740395008/unknown.png 20180803 14:19:29-!- wedge010 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20180803 14:22:25-!- behalebabo [~behalebab@unaffiliated/behalebabo] has joined #wesnoth-dev 20180803 14:25:37<+wesdiscordbot> perhaps related to #3350? 20180803 14:28:26<+wesdiscordbot> Interesting question, I'll try that 20180803 14:29:29<+wesdiscordbot> yes, the { .member = foo } initialization method is C++20 20180803 14:29:38<+wesdiscordbot> can't recall the exact term 20180803 14:29:53<+wesdiscordbot> you just need basic aggregate initilization 20180803 14:30:16<+wesdiscordbot> you also don't need to declare a ctor 20180803 14:31:29<+wesdiscordbot> cpp struct device_info { std::string name; int screen_dpi; int screen_width_px; int screen_height_px; double screen_width_pt; double screen_height_pt; }; static std::map devices { { "iPhone4,1", { "iPhone 4S", 326, 640, 960, 0, 0 } }, }; 20180803 14:33:33<+wesdiscordbot> @Vultraz I didn't have problem with this new type declaration but I can't get value of name, or screen_dpi because of error above 😦 20180803 14:33:36<+wesdiscordbot> well, actually, needs to be non-const if you want to use [] 20180803 14:34:52<+wesdiscordbot> dunno why that error would come up 20180803 14:35:41<+wesdiscordbot> it is not related to #3350 20180803 14:35:56<+wesdiscordbot> i presume the struct declaration is in the same file? 20180803 14:36:58<+wesdiscordbot> yes, I'll show you both files (header and cpp) 20180803 14:40:09<+wesdiscordbot> hpp h #ifndef iOS_device_info_hpp #define iOS_device_info_hpp #include #include #include class iOS_device_info { public: static std::string get_device_name(); private: iOS_device_info() {} struct device_info; static std::map devices; }; #endif /* iOS_device_info_hpp */ cpp cpp #include "iOS_device_info.hpp" std::string 20180803 14:40:09<+wesdiscordbot> iOS_device_info::get_device_name() { return devices["iPhone7,1"].name; } struct device_info { std::string name; int screen_dpi; int screen_width_px; int screen_height_px; double screen_width_pt; double screen_height_pt; }; static std::map devices = { { "iPhone4,1", { .name="iPhone 4S", .screen_dpi=326, .screen_width_px=640, .screen_height_px=960, .screen_width_pt=0, 20180803 14:40:10<+wesdiscordbot> .screen_height_pt=0 } }, }; 20180803 14:40:49<+wesdiscordbot> move the function declaration to the nd 20180803 14:41:17<+wesdiscordbot> er 20180803 14:41:20<+wesdiscordbot> implementation 20180803 14:41:31<+wesdiscordbot> after declaring the devices map 20180803 14:43:05<+wesdiscordbot> Same 😦 (I updated code above) 20180803 14:43:34<+wesdiscordbot> (unrelated, but get_device_name should be const) 20180803 14:44:50<+wesdiscordbot> @hrubymar10 oh, I think is ee the problem 20180803 14:45:18<+wesdiscordbot> you forward-declared device_info as a member of iOS_device_info 20180803 14:45:32<+wesdiscordbot> same for the devices map 20180803 14:45:46<+wesdiscordbot> both need to be implemented in terms of iOS_device_info 20180803 14:48:19<+wesdiscordbot> yes, works now 😄 Thank you 😃 20180803 14:48:40<+wesdiscordbot> honestly there's no real need to make devices a member of iOS_device_info 20180803 14:48:52<+wesdiscordbot> you can keep that map and the struct completely restricted to the implementation 20180803 14:49:06<+wesdiscordbot> assuming you intend all access to be via getter methods. 20180803 15:03:54<+wesdiscordbot> Thank you for this suggestion. I rewrote it this way and it works 😃 20180803 15:37:38-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180803 15:37:44-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20180803 15:52:27-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180803 15:52:33-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20180803 16:11:50-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180803 16:11:56-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20180803 16:24:00-!- DeFender1031 [~DeFender1@dsl217-132-3-156.bb.netvision.net.il] has quit [Quit: I'm not back now.] 20180803 16:29:21-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20180803 16:40:08-!- nurupo [~nurupo.ga@unaffiliated/nurupo] has quit [Ping timeout: 276 seconds] 20180803 16:41:45-!- lilinitsy_ [~demonitsy@75-168-95-50.mpls.qwest.net] has quit [Ping timeout: 264 seconds] 20180803 16:42:39-!- nurupo [~nurupo.ga@unaffiliated/nurupo] has joined #wesnoth-dev 20180803 17:06:05-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180803 17:06:11-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20180803 19:42:34-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180803 19:42:40-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20180803 20:00:45-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180803 20:00:51-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20180803 20:02:13-!- gallaecio [~quassel@89.96.79.188.dynamic.jazztel.es] has joined #wesnoth-dev 20180803 20:27:45-!- valdar [~atarocch@37.177.21.182] has quit [Ping timeout: 248 seconds] 20180803 21:05:59-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180803 21:06:05-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20180803 21:27:56-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20180803 21:38:05-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180803 21:38:11-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20180803 21:48:12-!- gallaecio [~quassel@89.96.79.188.dynamic.jazztel.es] has quit [Quit: http://quassel-irc.org - Converse confortabelmente. En calquera parte.] 20180803 22:28:28-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20180803 22:38:56-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20180803 22:45:44-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180803 22:45:50-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20180803 22:53:10-!- Appleman1234 [~quassel@121.222.137.147] has joined #wesnoth-dev 20180803 23:00:40-!- ben_zen28 [~ben_zen@cpe-67-249-202-69.twcny.res.rr.com] has joined #wesnoth-dev 20180803 23:00:51-!- ben_zen28 [~ben_zen@cpe-67-249-202-69.twcny.res.rr.com] has quit [Remote host closed the connection] 20180803 23:27:02-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20180803 23:47:57-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180803 23:48:03-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20180803 23:48:18-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has joined #wesnoth-dev 20180803 23:53:18-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180803 23:53:24-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev --- Log closed Sat Aug 04 00:00:36 2018