plot
plot copied to clipboard
Make it compile nicely on 32 bit ARM platforms with GCC
Make it compile nicely on 32 bit ARM platform
Thank you! Could you please elaborate a bit why is this necessary? In theory std::ptrdiff_t should be a pointer-sized signed type on any platform, so I expected it to be the same as long int also on 32-bit ARM.
Is this not true? Which compiler errors are you seeing?
Yes it is 32 bit on arm. But all max/min functions in the code compare point coordinates with constants that look like “1L” (long int) so type matching breaks and compiler throws errors.
Perhaps using “L” suffix is not necessary? I doubt there is terminal in real life that will require long int precision :)
Regards.
On Feb 1, 2019, at 4:28 AM, Fabio Massaioli [email protected] wrote:
Thank you! Could you please elaborate a bit why is this necessary? In theory std::ptrdiff_t should be a pointer-sized signed type on any platform, so I expected it to be the same as long int also on 32-bit ARM.
Is this not true? Which compiler errors are you seeing?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Perhaps cleaner fix will be to explicitly cast all constants to point coordinate type. I did not go this route with time constraints I had.
On Feb 1, 2019, at 4:28 AM, Fabio Massaioli [email protected] wrote:
Thank you! Could you please elaborate a bit why is this necessary? In theory std::ptrdiff_t should be a pointer-sized signed type on any platform, so I expected it to be the same as long int also on 32-bit ARM.
Is this not true? Which compiler errors are you seeing?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Oh I see... Ironically I introduced all those L prefixes precisely to fix type matching :smile:
Yeah the right solution should be explicit casting like Coord(1). I can take some time to make the change myself if you don't have time. Or maybe I could improve min/max templates and make this unnecessary. Let's see.
I won't merge right now, but I'm keeping this PR open while I have a look at the code
Sure thing :) Cool library btw!
On Feb 1, 2019, at 9:23 AM, Fabio Massaioli [email protected] wrote:
Oh I see... Ironically I introduced all those L prefixes precisely to fix type matching 😄
Yeah the right solution should be explicit casting like Coord(1). I can take some time to make the change myself if you don't have time. Or maybe I could improve min/max templates and make this unnecessary. Let's see.
I won't merge right now, but I'm keeping this PR open while I have a look at the code
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.