IRC logs for #openttd.dev on OFTC at 2014-03-03
⏴ go to previous day
17:06:08 *** Alberth has joined #openttd.dev
17:06:08 *** ChanServ sets mode: +v Alberth
17:22:59 *** frosch123 has joined #openttd.dev
17:22:59 *** ChanServ sets mode: +v frosch123
20:03:23 <fonsinchen> I've tested on Arch linux: it works
20:04:32 *** Rubidium_ is now known as rubidium
20:04:40 *** ChanServ sets mode: +v rubidium
20:04:49 <rubidium> line 297 misses a space
20:05:11 <rubidium> 292 more or less too
20:05:23 <rubidium> what about the case when i == 1?
20:06:05 <rubidium> because then chosen remains 0, right?
20:07:37 <rubidium> oh, never mind... was not seeing the point calculation magic
20:08:03 <rubidium> having said that, what about sizeof(size_t) == 8; then 288 would give a warning/error, wouldn't it?
20:08:51 <fonsinchen> no sizeof(size_t) == 8
20:09:03 <fonsinchen> what good whould a size_t of size 8 be?
20:10:03 <frosch123> that's the normal case on 64bit systems
20:10:18 <frosch123> but i don't think there would be a warning
20:10:35 <frosch123> i have only seen warnings for pointer -> int conversions
20:10:45 <frosch123> but a pointer-difference is no pointer
20:11:18 <rubidium> but sizeof(ptrdiff_t) == sizeof(size_t), right?
20:11:26 <fonsinchen> Where does line 297 miss a space?
20:12:03 <fonsinchen> I've actually compiled it on 64bit and it didn't give an error
20:12:18 <frosch123> rubidium: i do not get a warning when assigning a uint32 to a byte either
20:12:29 <rubidium> fonsinchen: good question; seems like the monospace font in my browser is getting my head messed up
20:12:34 <rubidium> frosch123: I think it's MSVC
20:13:12 <rubidium> but just commit it without, then we'll see it quickly enough
20:13:22 <fonsinchen> num_fixed_sizes - i should do the trick, too
20:13:59 <michi_cc> rubidium: ptrdiff_t *can* be smaller than size_t, usually not for Windows or Linux though. Who knows about stuff like S390 though...
20:14:31 <rubidium> fonsinchen: it looks okay to me
20:15:51 <michi_cc> Hmm, actually, it can even be on Win/Linux, if you use the Intel C++ compiler and compile for x64 with small memory model. 64-bit registers and everything, but program ("near") memory space limited to 32 bit.
20:16:34 <fonsinchen> I'll post a new patch later
21:21:40 <fonsinchen> This doesn't do pointer calculation there.
22:29:33 *** Alberth has left #openttd.dev
continue to next day ⏵