You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example: vt_write_int32BE('sub3');". This works if the compiler has right semantics but could be just as well truncate (e.g. just take 's'). No well defined semantice in C++ standard AFAIK.
Everything is basically wrong there. You could define byte arrays that have the data already in correct byte order (i.e. big endian in the example) and have named costants for them (e.g. SUB32_BE). In addition fixing the compiler warnings that gives a minor performance improvement as you don't end up doing useless byte order conversions constantly...
And that would also be fully cross platform, works both little and big endian hardware platforms.
The text was updated successfully, but these errors were encountered:
Example:
vt_write_int32BE('sub3');"
. This works if the compiler has right semantics but could be just as well truncate (e.g. just take 's'). No well defined semantice in C++ standard AFAIK.Everything is basically wrong there. You could define byte arrays that have the data already in correct byte order (i.e. big endian in the example) and have named costants for them (e.g.
SUB32_BE
). In addition fixing the compiler warnings that gives a minor performance improvement as you don't end up doing useless byte order conversions constantly...And that would also be fully cross platform, works both little and big endian hardware platforms.
The text was updated successfully, but these errors were encountered: