[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Byte order conversions
From:       Richard Smith <kde () metafoo ! co ! uk>
Date:       2004-10-27 17:46:40
Message-ID: 200410271846.40642.kde () metafoo ! co ! uk
[Download RAW message or body]

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<T>(...), bigToMachineEndian<T>(...), 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 <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic