Registriert seit: 7. Jun 2006
Ort: Karlsruhe
3.724 Beiträge
FreePascal / Lazarus
|
AW: C++ pointer to byte array --> Delphi
2. Dez 2013, 13:53
Looks mostly good to me, but I would pay some extra attention to the type casts. I am not sure if ord()
always gives the correct result here. In some places the type cast might be done to truncate a value. For example, (ushort)foo
gives us the lowest 16 bits of foo
.
And in the top code, I think you can get rid of ord()
entirely, if you've correctly translated char as byte.
Geändert von Namenloser ( 2. Dez 2013 um 13:55 Uhr)
|