IRC logs for #openttd on OFTC at 2025-03-16
            
00:23:56 <DorpsGek> [OpenTTD/OpenTTD] chris3k commented on pull request #13432: Add: Press Ctrl to build diagonal canals in game mode https://github.com/OpenTTD/OpenTTD/pull/13432#issuecomment-2727081956
00:43:41 <DorpsGek> [OpenTTD/OpenTTD] LC-Zorg commented on pull request #13817: Change: Error window colour changes based on severity https://github.com/OpenTTD/OpenTTD/pull/13817#issuecomment-2727097851
00:46:29 <truebrain> LordAro: totally not unexpected, the reply I got from Steam:
00:46:31 <truebrain> ```We have chosen to limit access to some community features as a means of protecting users from those who abuse Steam merely for purposes such as spamming and phishing.
00:46:31 <truebrain> To access all features of Steam, you will need to spend at least $5.00 USD within the Steam store.```
00:46:38 <truebrain> I doubt they even read anything I wrote
00:46:45 <truebrain> and just hit the "auto reply with template" button
00:47:08 <wensimehrp> lolz
00:49:27 <truebrain> "It works via the browser but not via steamcmd" - "owh, your account has limit access"
00:49:32 <truebrain> In what world does that make sense?
00:52:18 <truebrain> Ah, also found a support portal for the Partner part ... let's ask the same question there!
00:54:25 <truebrain> (and no, I am not going to pay 5 USD in the "hope it solves a problem" πŸ˜› )
01:04:24 <jfkuayue> https://cdn.discordapp.com/attachments/1008473233844097104/1350635782905532418/image.png?ex=67d77518&is=67d62398&hm=0332cd1630e34e0f9075fdcec885b011310de178f8997be93764f52c75809686&
01:04:24 <jfkuayue> https://cdn.discordapp.com/attachments/1008473233844097104/1350635783194804224/image.png?ex=67d77518&is=67d62398&hm=1ab054fdba055580068c3b8df7f454e4aa434e82a821d20736856aa4d90c626b&
01:04:24 <jfkuayue> I thought they were powered by AI
01:09:51 <DorpsGek> [OpenTTD/OpenTTD] krysclarke commented on issue #13825: [Bug]: Follow button stays visually pressed after moving main view https://github.com/OpenTTD/OpenTTD/issues/13825
01:18:49 *** Tirili has joined #openttd
01:34:15 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
01:34:17 *** WormnestAndroid has joined #openttd
01:55:46 *** Tirili has quit IRC (Remote host closed the connection)
01:57:51 *** Tirili has joined #openttd
02:11:12 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
02:12:47 *** gelignite has quit IRC (Quit: Stay safe!)
02:13:02 *** WormnestAndroid has joined #openttd
03:05:39 *** gelignite has joined #openttd
03:05:54 *** gelignite has quit IRC (Remote host closed the connection)
03:06:00 *** debdog has joined #openttd
03:09:31 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
03:17:22 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
03:17:24 *** WormnestAndroid has joined #openttd
03:17:27 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
03:17:42 *** WormnestAndroid has joined #openttd
03:32:36 *** geizeskrank has quit IRC (Ping timeout: 480 seconds)
03:36:09 *** geizeskrank has joined #openttd
03:48:51 *** Tirili has quit IRC (Remote host closed the connection)
03:49:40 *** Tirili has joined #openttd
04:03:40 *** D-HUND has joined #openttd
04:07:01 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:42:33 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13824: Codechange: fix or remove fixmes https://github.com/OpenTTD/OpenTTD/pull/13824
05:20:43 *** Extrems has quit IRC (Quit: ZNC 1.7.5 - https://znc.in)
05:20:49 *** Extrems has joined #openttd
05:28:24 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #13830: Codechange: simplify some complicated logic https://github.com/OpenTTD/OpenTTD/pull/13830
05:36:25 <DorpsGek> [OpenTTD/OpenTTD] Release workflow was not successful https://github.com/OpenTTD/OpenTTD/actions/runs/13880246297
05:59:51 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #13831: Codechange: simplify logic and prevent invalid bit https://github.com/OpenTTD/OpenTTD/pull/13831
06:06:36 <DorpsGek> [OpenTTD/OpenTTD] github-advanced-security[bot] commented on pull request #13830: Codechange: simplify some complicated logic https://github.com/OpenTTD/OpenTTD/pull/13830#pullrequestreview-2688524444
06:17:27 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #13830: Codechange: simplify some complicated logic https://github.com/OpenTTD/OpenTTD/pull/13830
07:16:59 <peter1138> It is far too cold.
07:17:30 <reldred> we just had a cool change roll through today, it was 40C yesterday
07:19:36 <peter1138> -3Β°C
07:19:50 <reldred> wonderful, perfect.
07:19:55 <reldred> actually no
07:20:02 <reldred> my knees would ache in that weather
07:20:09 <reldred> and my hands
07:27:31 *** nielsm has joined #openttd
07:45:23 *** Wolf01 has joined #openttd
07:47:22 *** Tirili has quit IRC (Remote host closed the connection)
07:53:29 <DorpsGek> [OpenTTD/bananas-api] WenSimEHRP opened issue #499: Changelog, readme, and license cannot be .md https://github.com/OpenTTD/bananas-api/issues/499
07:56:43 <DorpsGek> [OpenTTD/bananas-api] WenSimEHRP opened issue #500: Changelog, readme, and license files are not recognized when filename is capitalized https://github.com/OpenTTD/bananas-api/issues/500
08:24:46 *** nielsm has quit IRC (Ping timeout: 480 seconds)
09:04:28 <_zephyris> truebrain: Isn't there a one off fee to publish anyway?
09:05:12 <truebrain> There is. What makes me very sus of this answer
09:05:42 <truebrain> But who knows, they might now restrict business accounts to their steamcmd because it hasn't any transaction ......
09:06:38 <_zephyris> Mmm, plausible and annoying
09:08:43 <michi_cc> So we are supposed to publish a 1 cent golden toilet DLC now? 🀣
09:09:47 <truebrain> no no, 5 dollar!
09:11:35 <truebrain> funny enough, my own OpenTTD account, I can login via SteamCMD just fine. And has the same restrictions
09:12:04 <truebrain> The only difference is that it uses Steam Mobile to do 2FA, and the upload account uses an OTP
09:12:52 <truebrain> so I am somewhat tempted to just create a new Steam account πŸ˜› πŸ˜›
09:14:33 <truebrain> mostly, it is still very silly a platform like Steam doesn't have API keys to allow uploading new versions of your game. That is still mind blowing to me.
09:19:24 <peter1138> Do the regression tests test cargo monitors?
09:21:40 <peter1138> Or even... what GS use it.
09:25:36 <andythenorth> coffee?
09:28:29 <_zephyris> β˜•
09:28:50 <_zephyris> Custom industry fields and coffee plantations...
09:35:22 <peter1138> /* Skip the cargo type section, we only care about the default group */
09:35:39 <peter1138> Industries don't have per-cargo spritegroups.
09:37:17 *** wallabra has quit IRC (Read error: Connection reset by peer)
09:37:36 <peter1138> What if we appropriate an entry for field graphics.
09:37:57 <peter1138> But uh, is it just a ground sprite, or is it tile layout?
09:38:27 *** wallabra has joined #openttd
09:38:47 <_zephyris> Preferably a tile layout
09:39:07 <_zephyris> Plants, trees, greenhouses
09:39:11 <peter1138> There are 19 different slopes, so "a tile layout" isn't exactly right.
09:39:53 <_zephyris> Could restrict it to a single ground sprite, single above ground sprite
09:40:06 *** kuka_lie has joined #openttd
09:40:21 <_zephyris> And not go full sprite layout, which might tank performance if abused
09:42:24 <peter1138> Hmm, searching an unordered std::vector vs std::map... less than idea :/
09:44:51 <_zephyris> Fences too, set of a multiple of 6
09:45:48 <_zephyris> Field 'animation' too, actually a set of 9(?)x19 ground tiles.
09:51:50 <peter1138> For the "animation" state, I would let the NewGRF switch on that.Se
09:52:11 <peter1138> Seems like there's only 8 stages, even though 4 bits are used (which would allow 16 stages)
09:53:07 <peter1138> Or hay stacks are handled specially.
09:53:45 *** kuka_lie has quit IRC (Quit: Lost terminal)
09:53:48 <peter1138> Ah no, 9 stages, indeed.
09:54:21 <peter1138> Anyway, 16 could be possible.
09:55:42 <peter1138> Someone will want company-coloured fields, even though industries are not company-owned...
09:57:03 <andythenorth> tractors
09:57:09 <andythenorth> red ones, blue ones
09:57:54 <frosch123> I kind of liked the idea, that industries could spawn objects, which look like fields, surface mining, waste dumps, ...
09:58:22 *** kuka_lie has joined #openttd
09:59:07 <peter1138> Handling slopes with objects seems to be quite a pain.
10:00:12 <_zephyris> Only if you don't want foundations...
10:00:15 <frosch123> Fields are pure visuals with no function. So reinventing a new drawing code for them is like station non-track tiles
10:02:52 <_zephyris> Kinda... But it does give a visually consistent way of making it more expensive to build in big tracts of the landscape
10:02:54 <peter1138> Hmm, could tile layouts gain a "draw the correct slope" flag...
10:03:16 <_zephyris> Oooh...
10:03:46 <peter1138> Because authors seem to have difficulty with that. Not sure if it's the spec or the documentation, mind you.
10:04:44 <_zephyris> It just takes a single switch, but is a moderately complex one
10:06:05 <_zephyris> Right?
10:08:28 *** gelignite has joined #openttd
10:09:41 <xarick> @rubidium, there are some XXX comments, they're some kind of todo
10:11:15 <peter1138> I don't know any more. Okay, this is not my side-quest, other people already have other better ideas.
10:12:02 <frosch123> Since when is drawing the sloped sprites the problem? I only know it gets complicated if you want separate buildings with foundations on different elevations
10:13:05 <_zephyris> It's not a problem, but for the (no offence) grf authors who churn out object sets it seems too complex
10:16:23 <peter1138[d]> Not sure what this was about any more, but someone was having 'fun' with slopes...
10:16:57 <peter1138> Possibly the combo of slope & water checks rather than just slopes.
10:17:50 <peter1138> _zephyris, quantity not quality.
10:22:43 <wensimehrp> peter1138[d]: I wasn't
10:23:06 <wensimehrp> (yes I do see the quotation marks)
10:25:17 <_zephyris> Translating slopes to coasts is always a bit fiddly
10:25:21 <_zephyris> https://github.com/zephyris/opengfx2/blob/main/newgrf/nml/objects/objects-rocks.pnml
10:30:06 <peter1138> Okay so plain slopes are easy with tile layouts, but objects on coasts are not?
10:31:03 <_zephyris> Mildly harder, and only if you want to somehow retain/represent water on the watery corners
10:33:48 <_zephyris> Hmm, IIRC, it's differentiating between sea level and wet tiles
10:34:01 <_zephyris> Now I'm thinking I can't quite remember
10:38:39 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1350780297028964432/screenshot60.png?ex=67d7fbaf&is=67d6aa2f&hm=e8491bd73a6d809d894f4297096d183886cd5b1ce5ff9de494e80ca4a2148df3&
10:38:39 <xarick> shall I stop the test? it doesn't seem to get much better than this. or shall I wait for the profits to condense a bit more?
10:39:23 <peter1138> 1 fps, nice./
10:40:06 <xarick> i haven't restarted windows since 10th of march due to this test
10:40:37 <xarick> and windows wants to update stuff...
10:41:51 <LordAro> i'm pretty sure only you can answer that question
10:44:18 <xarick> im kinda sad AAAHogEx doesn't really aim for 5000
10:45:02 <xarick> seems to be doing some profit managements at the limit
10:45:22 *** kuka_lie has quit IRC (Read error: Connection reset by peer)
10:48:02 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1350782656777818113/image.png?ex=67d7fde1&is=67d6ac61&hm=8463bd9dcd009a2db397de78800c0d72a3b3b8cb8454033864c925670a7f3bd2&
10:48:02 <xarick> savegame sizes
10:48:26 <cu-kai> lol @ this
10:48:38 <cu-kai> got a picture of the map?
10:49:04 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1350782916812214273/screenshot61.png?ex=67d7fe1f&is=67d6ac9f&hm=f62c418b6d3e2269b2f590ab4776de25a4a6fa46f30c38032959e2411ca84678&
10:50:35 <cu-kai> heh
10:50:37 <cu-kai> impressive
10:50:46 <cu-kai> what CPU are you using?
10:51:14 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1350783465473183837/image.png?ex=67d7fea2&is=67d6ad22&hm=fc288fc89516da94da42afc9b76f5c6ce7165c50ff59fce01520a4cdd5daa1ff&
10:52:32 <cu-kai> single core speed around the same as my i9
10:52:39 <cu-kai> too bad openttd can't be multithreaded
10:56:32 <xarick> 4k map is enough for 75k trains
10:56:45 <cu-kai> only if you want to play at 1fps
10:56:46 <xarick> ppl still want bigger maps yet
10:57:06 <cu-kai> the largest i generated for a private multiplayer server was 1k
10:58:48 <kuhnovic> A 4K is already gigantic, I just don't understand that people want to go even bigger.
10:59:11 <cu-kai> lol, did i read here that people wanted 16k maps? :D
10:59:25 <kuhnovic> But as with any limit, the moment you come up with one there's always somebody that wants to see it doubled.
10:59:25 <cu-kai> the comment was some days ago, or longer
10:59:40 <truebrain> Ugh. Looking further into this Steam bla, and was looking over our actions ... CodeQL is totally trashing our attempt to cache stuff. You can only have 10GB of stuff in your Cache, and each CodeQL run creates 1GB in Cache. So yeah ... our cache is rather empty πŸ˜›
10:59:48 <kuhnovic> cu-kai: JGRPP already supports it
11:00:47 <cu-kai> huh, this is an interesting project
11:00:56 <truebrain> (mostly, our vcpkg is no longer in cache, it seems)
11:01:47 <truebrain> `Restored 12 package(s) from GitHub Actions Cache`
11:01:48 <truebrain> lol
11:02:06 <truebrain> so the cache overview tells me: you don't have vcpkg in your cache
11:02:12 <truebrain> but the run itself says: sure, I got it from the cache!
11:02:15 <truebrain> I am so confused πŸ˜›
11:04:28 <cu-kai> > Extra large maps. Maximum map size is now 256M tiles, ranging from 16k x 16k to 256 x 1M.
11:04:29 <cu-kai> rofl
11:04:36 <cu-kai> 256x1M
11:05:11 <xarick> does JGR increase max num of vehicles, orders, stations, etc...
11:05:19 <xarick> the pools
11:06:07 <xarick> I already struggle with station and order pool limits with my AI
11:07:18 <xarick> on openttd
11:07:22 <xarick> not jgrpp
11:08:08 <xarick> i am forced to use shared orders to avoid reaching orderlist limits
11:08:57 <xarick> limit train sizes to about 5 or 6 to avoid vehicleid limits
11:09:25 <xarick> so, 16k maps without these other values scaling as well feels pointless
11:09:44 <cu-kai> yeah
11:10:36 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain opened pull request #13832: Fix: [CI] Disable CodeQL TRAP Cache, as it trashes our cache https://github.com/OpenTTD/OpenTTD/pull/13832
11:11:15 <xarick> anyway, 1 fps per second is ... meh
11:12:22 <xarick> it's 2 tall tylers fault :=)
11:12:40 <truebrain> Right, that PR should fix that issue. Not the problem I was looking for, but the problem I found. Side-quests!
11:13:02 <xarick> tick length was reduced, so everything needs to compute more often
11:13:55 <xarick> it's totally not my fault that I'm running 75k trains, πŸ™‚
11:14:59 <peter1138> Not everyone is trying to max out the limits.
11:15:53 <_jgr_> xarick: The per-company vehicle limits and per-vehicle order limits are increased. There isn't any need to increase the actual pool sizes.
11:15:54 <DorpsGek> [OpenTTD/OpenTTD] frosch123 approved pull request #13831: Codechange: simplify logic and prevent invalid bit https://github.com/OpenTTD/OpenTTD/pull/13831#pullrequestreview-2688616722
11:17:00 <_jgr_> xarick: The point of larger maps is not to fill every available space with vehicles, if anything it's the opposite, to make things slower and more spread-out
11:18:51 *** kuka_lie has joined #openttd
11:21:55 <andythenorth> wonder what the ultimate map size is
11:21:59 <andythenorth> 64x64 is too small
11:22:14 <andythenorth> although it would make it plausible to use GS to control landscape per tile
11:25:25 <xarick> let me take a look at what I've done
11:28:23 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #13832: Fix: [CI] Disable CodeQL TRAP Cache, as it trashes our cache https://github.com/OpenTTD/OpenTTD/pull/13832#pullrequestreview-2688619181
11:30:19 <xarick> > StationID: 64k -> 0xFF000, 64k per company
11:30:19 <xarick> > DepotID: 64k -> 0xFF000
11:30:19 <xarick> > GroupID: 64k -> 0xFF000, 64k per company
11:30:19 <xarick> > OrderListID: 64k -> 0xFF000
11:30:19 <xarick> > RoadStopID: 64k -> 0xFF000
11:30:29 <xarick> apparently I didn't increase VehicleID limits πŸ˜›
11:32:57 <DorpsGek> [OpenTTD/OpenTTD] frosch123 commented on pull request #13830: Codechange: simplify some complicated logic https://github.com/OpenTTD/OpenTTD/pull/13830#pullrequestreview-2688616999
11:33:18 <xarick> if the average aircraft takes 2 vehicle ids, average ship takes 1, average roadveh takes 1, then that takes 300k vehicleids.
11:33:36 <xarick> about 700k remaining for trains
11:34:48 <xarick> about ~9 vehicles per train, that's train sized 4.5 tiles
11:35:15 <xarick> manageable
11:36:10 <xarick> I have the ultimate dream of 75k of every vehicle type
11:48:45 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain merged pull request #13832: Fix: [CI] Disable CodeQL TRAP Cache, as it trashes our cache https://github.com/OpenTTD/OpenTTD/pull/13832
12:01:27 <DorpsGek> [OpenTTD/team] frosch123 commented on issue #623: [nl_NL] Translator access request https://github.com/OpenTTD/team/issues/623
12:02:31 <jfkuayue> 64x1048576 would be interesting to play
12:02:48 <peter1138> I'd like to use something like PoolID but for non-pool items. What to do...
12:03:12 <peter1138> Perhaps StrongType is more appropriate.
12:03:28 <peter1138> Kinda similar.
12:04:33 <ahyangyi> jfkuayue: πŸ€” Perhaps I should make a 16:1 Curveland 5?
12:05:14 <peter1138> jfkuayue, I bet it would not be interesting to play.
12:06:42 <jfkuayue> https://cdn.discordapp.com/attachments/1008473233844097104/1350802453682982912/IMG_7848.jpg?ex=67d81051&is=67d6bed1&hm=43fca65cd1bec1f126612916f426e4065c58e110d740b786d8c87d7c864f7adb&
12:06:42 <jfkuayue> addicted to this
12:07:25 <xarick> dear.. someone, I can't build clang-release with "configurationType": "Release",
12:07:40 <xarick> only with "configurationType": "RelWithDebInfo",
12:08:05 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1350802802796007535/image.png?ex=67d810a4&is=67d6bf24&hm=277ecd111c761fd30c0c5319b11fbd6a19ce5ea0a3c0ef8903f79753c1aab631&
12:08:23 <xarick> where is this manifest file
12:10:02 <_glx_> Tried a clean build?
12:10:16 <xarick> yes
12:11:04 <_glx_> Release and RelWithDebInfo should be very similar
12:12:27 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1350803902110498856/message.txt?ex=67d811aa&is=67d6c02a&hm=dedee5a64746ee2e7f8fe3a50bdc1b04495b52186dbc4eac937081b9057b1cc4&
12:13:47 <_glx_> Manifest is <https://github.com/OpenTTD/OpenTTD/blob/master/os/windows/openttd.manifest> and is valid
12:14:59 <xarick> gonna try delete the entire vcpkg
12:19:24 <DorpsGek> [OpenTTD/OpenTTD] frosch123 approved pull request #13829: Codechange: remove unneeded locking from SmallStack https://github.com/OpenTTD/OpenTTD/pull/13829#pullrequestreview-2688631590
12:19:43 <xarick> nope
12:19:47 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
12:21:21 <xarick> deleted the out folder, let's see now
12:22:47 <xarick> nope, doesn't work, still same error
12:23:17 *** nielsm has joined #openttd
12:27:00 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1350807564841127957/image.png?ex=67d81514&is=67d6c394&hm=ecc42e8a21eb4af5824a19a41cfa1ffaa23886d36f871f22e7afbef6ebd8bd88&
12:27:00 <xarick> windows events tells me this
12:31:07 <xarick> when I switch to RelWithDebInfo, it runs
12:31:22 <xarick> seems to be missing the reqestedExecutionLevel
12:31:34 <xarick> according to a bing search
13:02:14 <xarick> how do i check whether the manifest is being... uh... looked upon?
13:02:26 <xarick> when building openttd
13:03:10 <xarick> i see some .ps1 and .bat scripts here
13:13:55 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13829: Codechange: remove unneeded locking from SmallStack https://github.com/OpenTTD/OpenTTD/pull/13829
13:14:18 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 closed pull request #13818: Codefix: potential check of thread-shared field evades lock acquisition https://github.com/OpenTTD/OpenTTD/pull/13818
13:14:21 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13818: Codefix: potential check of thread-shared field evades lock acquisition https://github.com/OpenTTD/OpenTTD/pull/13818#issuecomment-2727397424
13:14:25 <kuhnovic> jfkuayue: As a dutchman I approve
13:14:26 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13831: Codechange: simplify logic and prevent invalid bit https://github.com/OpenTTD/OpenTTD/pull/13831
13:15:23 <_glx_> xarick: manifest is included at <https://github.com/OpenTTD/OpenTTD/blob/master/CMakeLists.txt#L247>, and it works for all build types
13:17:19 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #13830: Codechange: simplify some complicated logic https://github.com/OpenTTD/OpenTTD/pull/13830
13:18:31 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13830: Codechange: simplify some complicated logic https://github.com/OpenTTD/OpenTTD/pull/13830#pullrequestreview-2688682043
13:19:42 <xarick> Generating ottdres.rc
13:24:17 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #13830: Codechange: simplify some complicated logic https://github.com/OpenTTD/OpenTTD/pull/13830
13:27:18 <_glx_> oh weird it fails for me too
13:27:46 <digitalfox> I was curious and looking at all the open PR…
13:27:46 <digitalfox> I’m no Dev and who am I to judge…
13:27:46 <digitalfox> But Xarick, you have 28 open PR, are you sure they are all still relevant?
13:28:08 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #13830: Codechange: simplify some complicated logic https://github.com/OpenTTD/OpenTTD/pull/13830#pullrequestreview-2688693979
13:31:12 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13830: Codechange: simplify some complicated logic https://github.com/OpenTTD/OpenTTD/pull/13830#pullrequestreview-2688684622
13:31:15 <DorpsGek> [OpenTTD/OpenTTD] frosch123 opened pull request #13833: Codechange: Replace C-style casts with static_cast/reinterpret_cast/constructors https://github.com/OpenTTD/OpenTTD/pull/13833
13:32:37 <frosch123> Have fun reviewing that one :p
13:33:04 <ahyangyi> https://cdn.discordapp.com/attachments/1008473233844097104/1350824189132541982/image.png?ex=67d8248f&is=67d6d30f&hm=62f2c7d85687340e413162f253fb3c10e07dd5f3cd29f0a623e608d7a48d19d4&
13:34:14 <Rubidium> frosch123: done... "needs work" :D
13:35:12 <ahyangyi> yeah, the CI didn't pass 😦
13:35:14 <_glx_> https://github.com/llvm/llvm-project/issues/120394 it's a clang-cl bug
13:39:16 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13830: Codechange: simplify some complicated logic https://github.com/OpenTTD/OpenTTD/pull/13830#pullrequestreview-2688700923
13:43:21 <xarick> oh... nice find
13:45:01 <DorpsGek> [OpenTTD/OpenTTD] frosch123 commented on pull request #13830: Codechange: simplify some complicated logic https://github.com/OpenTTD/OpenTTD/pull/13830#pullrequestreview-2688702334
13:45:58 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1350827438174896178/image.png?ex=67d82796&is=67d6d616&hm=244b05b84ba74d2b3fa8ba573a1c5a244c05b832f7e053b1e59c7dee72e00c10&
13:45:58 <_glx_> extracted from "broken" openttd.exe
13:46:02 <DorpsGek> [OpenTTD/OpenTTD] frosch123 approved pull request #13830: Codechange: simplify some complicated logic https://github.com/OpenTTD/OpenTTD/pull/13830#pullrequestreview-2688702624
13:47:49 *** WormnestAndroid has quit IRC (Remote host closed the connection)
13:47:50 *** WormnestAndroid has joined #openttd
13:51:35 <DorpsGek> [OpenTTD/OpenTTD] frosch123 updated pull request #13833: Codechange: Replace C-style casts with static_cast/reinterpret_cast/constructors https://github.com/OpenTTD/OpenTTD/pull/13833
13:52:16 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1350829024406016070/image.png?ex=67d82910&is=67d6d790&hm=61ad80b30228b3a2929d01f1b1b088f8001b32900c6168688f159a1b7d2561b1&
13:52:16 <_glx_> RelWithDebInfo is "correct"
13:52:59 <xarick> where is this located?
13:53:32 <_glx_> inside openttd.exe
13:53:41 <_glx_> needs to be extracted using mt.exe
13:53:46 <xarick> oh πŸ™‚
13:54:40 <xarick> which of my 28 PRs are irrelevant
13:54:45 <peter1138> Hmm, need to revisit this design. Or simply not use this design.
13:54:45 <_glx_> anyway our manifest is fine
13:55:10 <peter1138> Storing widget state inside a widget is fine until you refresh the widgets and your state is lost. Oops.
13:56:01 <truebrain> oooeeehhhh, are we now using clang-tidy? πŸ˜„
13:57:36 <frosch123> Except compilers disagree on the result :)
13:58:18 <truebrain> the question is: is clang disagreeing?
13:58:21 <truebrain> as that would be funny πŸ˜›
13:58:29 <_glx_> I remember when we had a fight between gcc and clang
13:58:32 <frosch123> truebrain: I wonder who will side-quest the remaining 100+ tidy rules
13:59:05 <truebrain> if we can add clang-format to it too
13:59:14 <truebrain> we can just kill every patch out there, and be done with it πŸ™‚
13:59:21 <truebrain> add tidy and format to the CI, and they never reappear!
14:00:12 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13833: Codechange: Replace C-style casts with static_cast/reinterpret_cast/constructors https://github.com/OpenTTD/OpenTTD/pull/13833#issuecomment-2727455883
14:02:29 <DorpsGek> [OpenTTD/OpenTTD] frosch123 updated pull request #13833: Codechange: Replace C-style casts with static_cast/reinterpret_cast/constructors https://github.com/OpenTTD/OpenTTD/pull/13833
14:05:03 <xarick> wow rubidium touched order flags...
14:05:20 <xarick> but ignored unbunch
14:07:40 <xarick> are you going to do something about unbunch for scripts?
14:08:25 <xarick> i'd use it for my ships
14:09:00 <xarick> cus they really bunch up on top of each other no matter what I try
14:12:06 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13830: Codechange: simplify some complicated logic https://github.com/OpenTTD/OpenTTD/pull/13830
14:35:12 <xarick> trying to understad HasAtMostOneBit
14:40:30 <xarick> ```case OT_GOTO_DEPOT:
14:40:30 <xarick> return (order_flags & ~(OF_NON_STOP_FLAGS | OF_DEPOT_FLAGS)) == 0 &&
14:40:30 <xarick> ((order_flags & OF_SERVICE_IF_NEEDED) == 0 || (order_flags & OF_STOP_IN_DEPOT) == 0) &&
14:40:30 <xarick> ((order_flags & OF_SERVICE_IF_NEEDED) == 0 || (order_flags & OF_UNBUNCH_IN_DEPOT) == 0) &&
14:40:30 <xarick> ((order_flags & OF_STOP_IN_DEPOT) == 0 || (order_flags & OF_UNBUNCH_IN_DEPOT) == 0);```
14:40:31 <xarick> How do I use `HasAtMostOneBit` here?
14:43:23 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1350841887166042253/image.png?ex=67d8350b&is=67d6e38b&hm=ca0414b58c1476442b3d2670f66517e96268e5cb387e1fb701d52ce59db37294&
14:44:40 <xarick> `HasAtMostOneBit(order_flags & (OF_SERVICE_IF_NEEDED | OF_STOP_IN_DEPOT | OF_UNBUNCH_IN_DEPOT)` will be correct?
14:57:17 <DorpsGek> [OpenTTD/OpenGFX] jayaddison commented on pull request #96: Script-Fu: update to GIMP3-compatible implementation https://github.com/OpenTTD/OpenGFX/pull/96#issuecomment-2727485035
15:05:26 <xarick> oh HasAtMostOneBit also returns true for 0 bits
15:05:30 <xarick> interesting
15:06:47 <xarick> not misleading
15:07:01 *** gelignite has quit IRC (Quit: Stay safe!)
15:07:22 <_glx_> no bits is at most one πŸ™‚
15:08:23 <xarick> "Has"
15:10:05 <LordAro> "at most"
15:12:46 <xarick> HasExactlyOneBit imo
15:13:18 <xarick> nevermind
15:13:25 <xarick> i understand how it works now
15:16:58 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #12249: Add: [Script] Unbunch order flag https://github.com/OpenTTD/OpenTTD/pull/12249
15:17:59 <andythenorth> lunch?
15:22:08 <xarick> 2cc trains in nml 3.1 made my AI crash
15:22:48 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1350851804891709470/image.png?ex=67d83e47&is=67d6ecc7&hm=2886766452367a16780246e564fbb4ba84130c1c34bd3a02de675742834acc73&
15:22:48 <xarick> which engine is 393?
15:23:32 <xarick> railtype 255 is very suspicious
15:23:54 <xarick> local railtype = AIEngine.GetRailType(engine);
15:24:45 <xarick> assert(AIEngine.GetVehicleType(engine) == AIVehicle.VT_RAIL); this is where it fails
15:26:22 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
15:26:23 *** Wormnest has joined #openttd
15:26:24 *** WormnestAndroid has joined #openttd
15:26:38 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
15:26:41 *** WormnestAndroid has joined #openttd
15:26:42 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
15:26:43 *** WormnestAndroid has joined #openttd
15:28:44 <xarick> engine 393, wagon 932
15:29:06 <xarick> why do these newgrfs always make billions of trains
15:31:40 <truebrain> Rubidium: close 24, get 22 new ones? πŸ˜„
15:33:09 <ahyangyi> xarick: πŸ˜›
15:33:38 <Rubidium> mostly the new version of fmt it seems, but also... some of the issues show many instances so if you solve one instance, you solved one but the remaining instances seem to become new issues
15:33:56 <Rubidium> in any case... going into the right direction
15:35:06 <truebrain> Always forward! \o/
15:37:33 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #13834: Codechange: use std::move over copying where applicable https://github.com/OpenTTD/OpenTTD/pull/13834
15:39:09 <Rubidium> and one annoying thing about fmt... we only use it in 'char` mode, so code that's there for `char16_t`/`char32_t`/`wchar` will trigger warnings about dead code or checks that'll always be true or false. So probably a lot of them can be dismissed
15:39:59 <xarick> problem must have been an engine became obsolete, removed from the list
15:40:07 <xarick> i'll fix it
15:45:56 <truebrain> can't you just ignore 3rdparty completely or something?
15:47:12 <Rubidium> yes, you can... but I rather dismiss a few false positives than miss issues
15:48:19 <DorpsGek> [OpenTTD/OpenTTD] Kuhnovic opened pull request #13835: Change: Close error message window on left click https://github.com/OpenTTD/OpenTTD/pull/13835
15:48:34 <kuhnovic> This one might kick up some dust πŸ˜›
15:49:01 <truebrain> Rubidium: Fair enough!
15:50:55 <truebrain> kuhnovic: Your PR is very unclear if this left behavior is on by default or behind the right click close setting
16:01:01 <kuhnovic> Clarified it a bit πŸ™‚
16:01:41 <Rubidium> truebrain: 16 dismissed, the other 8 are in the std::move PR.
16:02:34 <Rubidium> only coverity usually doesn't seem to update the statistics after dismissing, only after uploading a new build
16:05:41 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13834: Codechange: use std::move over copying where applicable https://github.com/OpenTTD/OpenTTD/pull/13834#issuecomment-2727518692
16:09:11 *** geizeskrank has quit IRC (Ping timeout: 480 seconds)
16:10:55 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #13835: Change: Close error message window on left click https://github.com/OpenTTD/OpenTTD/pull/13835#issuecomment-2727521319
16:11:05 <truebrain> sorry kuhnovic ; generally I love your ideas. This really is not one of them. It really really really isn't πŸ˜„
16:11:09 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #13834: Codechange: use std::move over copying where applicable https://github.com/OpenTTD/OpenTTD/pull/13834#pullrequestreview-2688736995
16:11:22 <truebrain> Also: please play around with radical PRs first πŸ˜› I broke it very easily πŸ˜„
16:11:37 *** geizeskrank has joined #openttd
16:12:27 <kuhnovic> A screaming toddler with a diaper full of number two came running in, I was a little distracted πŸ˜›
16:13:01 <truebrain> Owh, is that the excuse to not test PRs these days? πŸ˜› πŸ˜›
16:13:15 <truebrain> Anyway, I still think you are awesome. Just not this PR πŸ˜„
16:13:25 <kuhnovic> Nope, it's just my lame excuse for being a bit absent minded πŸ˜›
16:13:45 <kuhnovic> So why don't you like it, apart from it aparently not working as intented
16:13:52 <truebrain> See my reply πŸ™‚
16:13:53 <kuhnovic> (need to go now, I will look at it later)
16:13:57 <truebrain> in my book, it is just hostile UX
16:14:06 <truebrain> most errors are created by left click
16:14:12 <truebrain> so if you click twice, you create the error and close it
16:14:19 <truebrain> that will be very frustrating very quick
16:14:29 <truebrain> so I imagine your actual issue is not with the error window, but this specific usecase
16:14:35 <truebrain> as in that specific usecase, the error window is very annoying
16:15:27 <kuhnovic> Well I wasn't wrong about the pitchforks πŸ˜„ no hard feelings man, I appreciate you being honest. I'll get back to this later.
16:15:36 <truebrain> Back at you πŸ™‚
16:15:53 <truebrain> If you want to go this route, what you might do, is put a grace period in there, where the error doesn't close
16:15:56 <truebrain> so like 1 sec of not closing
16:16:02 <truebrain> but I am not sure that improves the situation
16:16:30 <truebrain> I also played with the idea of putting the error window just above the status bar, full width
16:16:35 <peter1138> I'd rather just promote right-click to close .
16:16:39 <truebrain> the height of the status bar
16:16:52 <talltyler> I wonder if a better resolution is showing fewer unnecessary errors in the first place.
16:17:11 <truebrain> Yup
16:17:22 <truebrain> I really don't like the error window jumps around like a mad man
16:17:25 <truebrain> that gets me so frustrated
16:17:35 <peter1138> toast-style popups?
16:18:14 <peter1138> Hmm, this drop-down list hack is... way to hacky :S
16:18:23 <peter1138> And not a Hackykid in sight.
16:18:25 <truebrain> So I do think there is reason to actually look into this stuff kuhnovic . As in general I do agree with you, especially with that specific usecase, that our error reporting is .. "meh" at best πŸ™‚
16:18:46 <truebrain> Just please no conflicting UX patterns πŸ˜„ πŸ˜„ πŸ˜„
16:19:15 <_glx_> oh it's just another UX on top of all the existing ones
16:21:23 <_glx_> but yeah, not fan of left click to close
16:22:26 <truebrain> Now I want to open my box of crazy ideas how to deal with errors again πŸ˜›
16:22:43 <truebrain> I also toyed with making window UI elements red when there was an error; but that was horrible πŸ˜›
16:22:57 <truebrain> maybe combining it with peters idea of popups ... πŸ˜„
16:29:13 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #13835: Change: Close error message window on left click https://github.com/OpenTTD/OpenTTD/pull/13835#issuecomment-2727529626
16:33:10 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13834: Codechange: use std::move over copying where applicable https://github.com/OpenTTD/OpenTTD/pull/13834
16:33:20 <xarick> locks make my hovercrafts slow
16:33:27 <peter1138> Hmm.
16:35:07 <xarick> make locks fast again
16:35:32 <xarick> πŸ€“
16:36:23 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13833: Codechange: Replace C-style casts with static_cast/reinterpret_cast/constructors https://github.com/OpenTTD/OpenTTD/pull/13833#pullrequestreview-2688736234
16:37:42 <xarick> China Discovers 60,000-Year Supply of Thorium
16:41:03 <xarick> RIP Arctic
16:44:32 <_zephyris> peter1138: Wait, you can right click to close errors?
16:45:05 <_zephyris> (can't check on a computer, have my own toddler issues...)
16:45:10 <peter1138> You can right click to close (almost) any window, if the appropriate setting is set.
16:45:43 <peter1138> Exception is windows with viewports where right click scrolls.
16:45:57 <_zephyris> Nice.
16:45:58 <peter1138> (And even then that's only on the viewport itself.)
16:49:05 <peter1138> Hmm.
16:51:35 <truebrain> _zephyris: No matter your settings , right click always closes errors
16:51:55 <truebrain> I never managed to get used to it, it is weird
16:53:13 <_zephyris> Similar to blender IIRC, I'd need to be at a computer to remember the muscle memory though
16:56:15 <peter1138> Oh, does it? Didn't know that.
17:28:24 <_zephyris> It's got a lot more conventional its ui recently
17:28:59 <_zephyris> Classic blender is a great example of ultra streamlined and efficient ui, but really unconventional
17:30:11 <_zephyris> Kinda like factorio... It's like entering some kind of zen state.
17:36:32 <peter1138> Hmm... label of things that don't fit in the window. 1) make window bigger (urgh), 2) tooltip 3) something else...?
17:36:35 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
17:38:39 *** WormnestAndroid has joined #openttd
17:49:01 <xarick> `auto IsBetter = [&best] (const auto *current) {` CammelCase for lambdas?
18:00:08 * soylent_cow[m] uploaded an image: (613KiB) < https://matrix.org/oftc/media/v1/media/download/AQjGpUhxk5GUJmobb-VN6j7Up3g05M2JT5XrzgBFEIbq-KJ71BfpEHdChmrnzqfe_zJSWhJhJ7wKVvIHpd71_HlCeV6DYDIQAG1hdHJpeC5vcmcvR0piaEtXckZEV3Z6Q0RHT1ptV1ZwTWhJ >
18:00:13 <soylent_cow[m]> satan's mine
18:09:58 <DorpsGek> [OpenTTD/OpenTTD] zephyris opened pull request #13836: Change: Update OpenTTD TTF fonts to v0.7 https://github.com/OpenTTD/OpenTTD/pull/13836
18:25:00 <xarick> digitalfox: let me see which PRs I can live without
18:26:33 <xarick> #10411 - I can live without
18:26:33 <xarick> #10544 - I need it for my AI ships, current search for depot range is too short
18:27:29 <xarick> #12083 - I can live without
18:30:16 <xarick> #12084, #12087, #12088 - Well, if I only focus on vanilla, I can live without. But AIs can't really guess the properties of newgrfs airports
18:30:47 <xarick> #12096, same as above
18:30:59 <xarick> #12093 - I can live without
18:32:46 <xarick> #12097 - I can live without, probably, not really using oilrigs atm
18:33:35 <xarick> #12193 is a bug fix
18:34:07 <xarick> #12249 - I'd like to try unbunch on my AI ships
18:36:15 <xarick> #12977, #13067, #13264, #13366, #13370, #13374 - I can live without, even though I wasted ton of time trying to improve rivergen
18:37:46 <xarick> #13398 - Well, I don't plan on using road waypoints, but... scripts currently don't support it properly
18:38:33 <xarick> #13419 - Same as above
18:39:56 <xarick> #13476 - I need it for my AI when using wallclock time mode
18:40:46 <xarick> #13565 - It would be really cool to have a way to setup different versions of the same AI, but I guess I could live without it
18:41:46 <digitalfox> Xarick I’m no one here, to say what PR should or shouldn’t be open.
18:41:46 <digitalfox> I just think in 115 open, you have 28 open, some from months, years ago.
18:41:46 <digitalfox> Maybe if the developers with power to aprove haven’t approved for so long, it might be because they are really busy, they don’t really see benefits, your code just doesn’t make the cut…
18:47:33 *** Wolf01 is now known as Guest11506
18:47:35 *** Wolf01 has joined #openttd
18:53:41 *** Guest11506 has quit IRC (Ping timeout: 480 seconds)
18:54:25 <ahyangyi> I think that having old pull requests is normal, because while it looks weird, it is often better than other alternatives, such as closing them.
18:55:22 <ahyangyi> Or keep track of those things in other ways
19:16:31 <DorpsGek> [OpenTTD/OpenGFX] jayaddison commented on issue #94: gimpscript: GIMP3 compatibility problem(s) https://github.com/OpenTTD/OpenGFX/issues/94
19:30:35 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13836: Change: Update OpenTTD TTF fonts to v0.7 https://github.com/OpenTTD/OpenTTD/pull/13836#pullrequestreview-2688776391
19:31:41 <Rubidium> digitalfox: for me it's mostly an issue of not listening to advice, getting annoyed by that and then just blocking it out to do the more fun things
19:36:47 *** gelignite has joined #openttd
19:41:33 <michi_cc> Rubidium: Something like "Fix: Alignment of 'i' with diacritics in OpenTTD Sans font"? (I don't think we gave Zephyris merge permissions yet πŸ™‚
19:46:06 <DorpsGek> [OpenTTD/OpenTTD] zephyris updated pull request #13836: Change: Update OpenTTD TTF fonts to v0.7 https://github.com/OpenTTD/OpenTTD/pull/13836
19:49:09 <_zephyris> Just saw this πŸ™‚ Went for "Fix: i circumflex width in TrueType small font"
19:49:43 <_zephyris> (Noone noticed/reported the problem with rarer i diacritics yet)
20:25:32 <Rubidium> either message's fine by me
20:34:11 *** Tirili has joined #openttd
20:35:09 *** Tirili has quit IRC ()
20:49:05 <xarick> I get ERR_ALREADY_BUILT when i build a rail track of a different rail type on a rail track
20:55:51 *** gelignite has quit IRC (Quit: Stay safe!)
21:02:11 *** tokai|noir has joined #openttd
21:02:11 *** ChanServ sets mode: +v tokai|noir
21:08:09 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1350938715199115365/image.png?ex=67d88f38&is=67d73db8&hm=65b2d027d83f67189352c50a33ea9f163f8bd254b76a4fdb399bb6642dad5ec6&
21:08:09 <andythenorth> I got
21:08:13 <andythenorth> but that was Chrome πŸ˜›
21:09:11 *** tokai has quit IRC (Ping timeout: 480 seconds)
21:14:16 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:17:27 <_zephyris> I got `ERR_ON_THE_SIDE_OF_CAUTION`, but that's just good advice.
21:21:29 <DorpsGek> [OpenTTD/OpenTTD] LC-Zorg commented on pull request #13835: Change: Close error message window on left click https://github.com/OpenTTD/OpenTTD/pull/13835#issuecomment-2727652928
21:23:58 <truebrain> Lol
21:30:29 <andythenorth> it's been a while πŸ™‚
21:37:34 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:04:46 <locosage> KuhnovicviaGitHub: hm, something like this would be quite fitting for cmclient
22:04:56 <locosage> with setting ofc
22:06:24 <xarick> how to backtrack?
22:06:51 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1350953487642660874/image.png?ex=67d89cfa&is=67d74b7a&hm=02b024d29ec804277b5c773868d1a88f88110d0ba401bc327c24a187c424a50f&
22:07:12 <xarick> green was faster
22:07:25 <xarick> so i want blue to move back one piece and pf again
22:08:48 <xarick> must think
22:15:46 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
22:20:01 <DorpsGek> [OpenTTD/OpenTTD] TheMowgliMan opened issue #13837: [Bug]: Maximum speeds do not match https://github.com/OpenTTD/OpenTTD/issues/13837
22:20:36 *** kuka_lie has quit IRC (Quit: Lost terminal)
22:26:18 <DorpsGek> [OpenTTD/OpenTTD] James103 commented on issue #13837: [Bug]: Maximum speeds do not match https://github.com/OpenTTD/OpenTTD/issues/13837
22:32:35 <DorpsGek> [OpenTTD/OpenTTD] TheMowgliMan commented on issue #13837: [Bug]: Maximum speeds do not match https://github.com/OpenTTD/OpenTTD/issues/13837
22:33:53 <DorpsGek> [OpenTTD/OpenTTD] WenSimEHRP commented on issue #13837: [Bug]: Maximum speeds do not match https://github.com/OpenTTD/OpenTTD/issues/13837
22:35:00 <DorpsGek> [OpenTTD/OpenTTD] James103 opened issue #13838: [Bug]: Invalid parameter in error message when an industry is in the way https://github.com/OpenTTD/OpenTTD/issues/13838
22:35:08 <DorpsGek> [OpenTTD/OpenTTD] PeterN closed issue #13837: [Bug]: Maximum speeds do not match https://github.com/OpenTTD/OpenTTD/issues/13837
22:35:11 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on issue #13837: [Bug]: Maximum speeds do not match https://github.com/OpenTTD/OpenTTD/issues/13837
23:00:39 <peter1138> Hmm, either I add a load of `std::move()`, or just copy the encoded string :S
23:01:11 <peter1138> Or.
23:01:15 <peter1138> Why does this work?
23:01:19 <peter1138> void CommandCost::AddCost(const CommandCost &ret)
23:01:20 <peter1138> {
23:01:21 <peter1138> ...
23:01:24 <peter1138> this->encoded_message = std::move(ret.encoded_message);
23:01:25 <peter1138> }
23:02:13 <_jgr_> The std::move will just do nothing there
23:05:09 <frosch123> std::move is just a cast. In this case it will cast to `const string &&`. Move assignment does not match the const, so overload resolution matches the copy assignment
23:05:51 <frosch123> This is C++ :)
23:13:13 <peter1138> Okay, can I make the function accept CommandCost &ret and CommandCost &&ret... :S
23:15:06 <frosch123> Either you make it a template. Or you make it a plain value parameter
23:15:59 <frosch123> The latter results in one copy one move for const &, and zero copy two moves for &&
23:16:38 <frosch123> So one move more expensive than the optimum
23:17:32 <frosch123> Which may be preferable over moving the function into the header as template
23:20:12 <_jgr_> Even then, the compiler may well optimise that away for LTO release builds
23:28:24 <frosch123> I think there was a meme making fun of "C++03: pass stuff as const ref, it's the best" vs "C++11: pass stuff by value, it's the best"