Times are UTC Toggle Colours
03:01:57 *** Supercheese has joined #openttd.dev 03:01:57 *** ChanServ sets mode: +v Supercheese 07:27:11 *** adf88 has joined #openttd.dev 07:27:11 *** ChanServ sets mode: +v adf88 08:05:30 *** Supercheese has left #openttd.dev 11:03:27 <adf88> I have few minor patches 11:03:46 <adf88> if you want to "waste" some Christmas time for OpenTTD then take a look :) 11:04:13 <adf88> fisrt one is to silence "IsVariableSizeRight defined but not used" warning 11:04:25 <adf88> when compiling with --enable-debug=0 11:04:46 <adf88> being more precise, when compiling with assertions 11:05:43 <adf88> http://pastebin.com/nP4iTZcE 11:06:36 <adf88> (sorry, not "with", but "without" assertions) 11:07:11 <adf88> (the warning appears when compiling with --disable-assert) 11:07:40 <adf88> second one 11:08:05 <adf88> silences "attempt to free non-hep object" warning 11:09:26 <adf88> since "-Wfree-nonheap-object" is re-enabled 11:11:10 <adf88> http://pastebin.com/XE0Qdjei 11:13:10 <adf88> third one 11:14:03 <adf88> adds limit to drag-drop placing waypoints 11:14:33 <adf88> so this is no more possible to highlight more then "station_spread" settings 11:14:38 <adf88> just like in case of stations 11:15:32 <adf88> currently if you select too much when placing waypoints you only get "empty" error 11:15:56 <adf88> like: "Can't place rail waypoint here..." (no detailed message) 11:19:40 <adf88> http://pastebin.com/W5s8Pfwj 11:20:14 <adf88> that's all 11:20:22 <adf88> merry xmas 11:22:57 <adf88> btw, there is an interesting bug about clipping 11:22:57 <adf88> and I have a proposal how to fix it 11:22:57 <adf88> http://bugs.openttd.org/task/6527 11:45:28 *** TheIJ has quit IRC 11:46:57 *** TheIJ has joined #openttd.dev 12:52:38 *** frosch123 has joined #openttd.dev 12:52:38 *** ChanServ sets mode: +v frosch123 13:02:16 <frosch123> ah, so the non-heap warning is only triggered when assertions are disabled 13:02:28 <frosch123> i think we should just disable it again 13:02:44 <frosch123> adding the funny cast only creates confusion 13:07:03 <adf88> another possible solution is to disable the warning only loacally 13:07:09 <adf88> with "pragma" 13:07:23 <frosch123> that only works with very recent gcc iirc 13:07:34 <frosch123> the compile farm does *not* run very recent gcc 13:07:39 <frosch123> so it will likely break stuff 13:07:59 <adf88> no, it's not that recent 13:08:06 <frosch123> and tbh i never encountered a bug where someone tried to free a nonheap object :) 13:08:28 <adf88> maybe you're right 13:08:36 <adf88> this warning is not much helpful 13:09:27 <adf88> I can live without it :) 13:10:53 <frosch123> the #ifdef WITH_ASSERT does not work for me 13:11:01 <frosch123> apparently it is not defined 13:12:26 <frosch123> hmm, i wonder what OTTD_ASSERT is 13:15:07 <adf88> yes yes 13:15:12 <adf88> it's the right macro 13:15:24 <adf88> sorry, I forgot about it 13:16:14 <frosch123> https://paste.openttdcoop.org/plr4ntcbt?/plr4ntcbt <- now i have that 13:19:58 <adf88> I'm wandering, is this second "ifdef" neede? 13:20:02 <adf88> needed? 13:20:29 <frosch123> i just did it the same way as in pool_func.hpp 13:22:49 <adf88> i don't know, it's better to assume that it is required 13:26:18 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r27709 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking" 13:27:00 <adf88> theoretically compilers should not interpret what's inside the "assert" macro when NDEBUG is defined but this is only hypothesis 13:34:04 <adf88> what do you think about this 13:34:04 <adf88> http://pastebin.com/x6cpdRGA 13:34:05 <adf88> ? 13:41:44 <frosch123> no idea, Rubidium and SmatZ always cared about that stuff :) 13:51:33 <adf88> the purpose of the above patch is to make sure that "assert" macro is an empty macro 13:52:29 <adf88> so you don't have to put "#ifdef OTTD_ASSERT" around "assert(something_not_defined)" 13:58:10 <adf88> no, no, no 13:58:18 <adf88> don't enable -Wno-narrowing 13:58:40 <adf88> only -Wfree-nonheap-object 13:58:53 <adf88> -Wnarrowing is usefull 13:59:38 <adf88> it's enabled in MSVC and it should be enabled in GCC too 14:04:18 <adf88> SORRY AGAIN 14:04:35 <adf88> you did not enable "Wno-narrowing" 14:05:12 <adf88> just ignore my last sentences 14:05:26 <frosch123> all those compiler versions are hell confusing :) 14:06:04 <adf88> that's the cost of being multiplatform 14:16:46 *** adf88 has quit IRC 14:18:00 *** adf88 has joined #openttd.dev 14:18:00 *** ChanServ sets mode: +v adf88 14:59:54 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r27710 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking" 15:00:04 <frosch123> typical ottd :) 15:00:20 <frosch123> the drag method was also used later down to decide the waypoint build axis 17:55:13 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r27711 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking" 17:56:58 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r27712 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking" 17:57:48 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r27713 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking" 18:45:39 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r27714 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking" 20:37:58 <Rubidium> compiler versions have nothing to do with being multiplatform 20:41:28 <Rubidium> regarding the IsVariableSizeRight, I guess that function should be put in #ifdef NDEBUG and the call (in assert can remain) 20:42:04 <frosch123> it's now in OTTD_ASSERT 20:42:10 <Rubidium> OTTD_ASSERT is a bit of a freak thingy 20:42:11 <frosch123> which fits what is used in pool_func 20:43:25 <Rubidium> I'm actually wondering why it's done that way 20:46:06 <Rubidium> it's a bit funky 20:47:21 <frosch123> it was added in r22041, just for the pool_func stuff 20:51:24 <frosch123> my irc logs do not start early enough on that day, so can't tell 21:00:07 <Rubidium> can't find anything useful on that day, but the patch is related to the one in FS#4468 21:04:44 <Rubidium> okay, the the third version of the patch for that bug has assert(checked != 0); #ifdef OTTD_ASSERT this->checked--; #endif 21:06:20 <Rubidium> and I said I would put the ifdef before the assert, but that was (probably) rather because those belong together and it makes little sense to have code in outside #ifdef that references a variable that is only valid when that #ifdef is true 21:06:43 <Rubidium> so yeah, I guess the same "logic" applies to IsVariableSizeRight as well 21:10:27 <LordAro> assert(checked-- != 0) wouldn't be undefined, i think? 21:12:05 <Rubidium> probably right, but who knows how assert is actually implemented 21:12:19 <LordAro> sanely, one would hope 21:12:52 <Rubidium> any developer should irk when seeing modifications being done in an assert 21:13:11 <LordAro> true, but it's no different to what's there currently 21:13:19 <LordAro> (in theory) 21:13:40 <Rubidium> mostly because assert is a macro and therefor it won't be executed when asserts are disabled, but not all valid good is maintainable 21:13:57 <Rubidium> s/good/code/ 21:18:29 <Rubidium> I regularly could write valid things in short manners, but still write it the long and possibly slightly less efficient way because to remains more maintainable that way. In here you could have claimed that check is only valid with OTTD_ASSERT, but that's not strictly the same as NDEBUG. In this case the count would remain in certain cases where the wasn't necessarily debugging 21:18:53 <Rubidium> it's a stupid configuration, but technically possible 21:27:41 *** adf88 has quit IRC 21:30:29 <LordAro> mm 21:30:44 <LordAro> i guess the next question is, can the code be rewritten to not need it? 22:25:22 *** frosch123 has quit IRC