-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it compile nicely on 32 bit ARM platforms with GCC #19
base: master
Are you sure you want to change the base?
Conversation
Thank you! Could you please elaborate a bit why is this necessary? In theory 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 ***@***.***> 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 ***@***.***> 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 😄 Yeah the right solution should be explicit casting like 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 ***@***.***> 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.
|
Make it compile nicely on 32 bit ARM platform