From kde-devel Wed Oct 27 17:46:40 2004 From: Richard Smith Date: Wed, 27 Oct 2004 17:46:40 +0000 To: kde-devel Subject: Re: Byte order conversions Message-Id: <200410271846.40642.kde () metafoo ! co ! uk> X-MARC-Message: https://marc.info/?l=kde-devel&m=109889935420213 On Wednesday 27 October 2004 17:42, Szombathelyi György wrote: > Ok, here comes my version. I'd like to commit it to kdelibs/kdecore, but > only after I get the green light. Any comments? My 2¢: The KBE2ME_nn macros and the like could just as well be inline functions. That'd be better for debugging; you'd be able to call them from gdb, and step into them. I personally would prefer more readable/obvious function/macro names. I think the KSWAP_nn functions would be more readable if they were made less compact; there's nothing wrong with having a brace on a line of its own (personal preference of course, YMMV). Again (but less important this time) I'd prefer more verbose names. And making them static will result in huge bloat if the compiler decides to make out-of-line copies (eg for debugging purposes). And a templated machineToBigEndian(...), bigToMachineEndian(...), etc would be nice too (so the caller doesn't have to care how wide an int is, for instance). -- Thanks, Richard >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<