Einzelnen Beitrag anzeigen

Namenloser

Registriert seit: 7. Jun 2006
Ort: Karlsruhe
3.724 Beiträge
 
FreePascal / Lazarus
 
#12

AW: C++ pointer to byte array --> Delphi

  Alt 2. Dez 2013, 12: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 12:55 Uhr)
  Mit Zitat antworten Zitat