int cSource::Position(int Code) auf CPUs bei denen int 64 bits hat
-
-
MarkusE
September 30, 2024 at 8:13 AM Changed the title of the thread from “int cSource::Position(int Code) auf CPUs bei denen in 64 bits hat” to “int cSource::Position(int Code) auf CPUs bei denen int 64 bits hat”. -
-
-
-
-
Was ist das eigentlich für eine CPU? Also x86 schon mal nicht.
-
-
Keine Sorge, ich mache es so wie in #3 vorgeschlagen. API bleibt unverändert.
-
Der letzte Test von MarkusE garantiert nicht, dass die obersten Bits komplett ignoriert wurden.
Vllt. noch mal gegentesten mit so etwas ähnlichem auf dem 64bit-int:
int16_t position = -5; // "S5W"
int code = 'S', code <<= 24; // satellite Prefix shifted
code |= position;
-
-
Hätte der cast mit erledigt, aber why not.
-
Ist eigentlich mehr zu Dokumentationszwecken, damit man sieht, dass das hier genau diese Bits sind.
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!