Re: [Announce] LNB-sharing patch for VDR 1.4.0-3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthias L?tzke wrote:
> Klaus.Schmidinger@xxxxxxxxxx says...
>>> - complete rewrite of the LNB-sharing code in cDevice::GetDevice() to
>>>   fit that somewhat cryptic new code in the VDR source
>> What's "cryptic" about it?
> 
> Bit shifting and bit manipulating code like 
> 
> [...]
> imp <<= 8; imp |= min(max(device[i]->Priority() + MAXPRIORITY, 0), 
> 0xFF);
> imp <<= 8; imp |= min(max(device[i]->ProvidesCa(Channel), 0), 0xFF);
> [...]
> 
> is hard to read and makes it difficult to understand the whole algorithm 
> without documentation.
> Personally I prefer to use bit manipulating operations only where it is 
> unavoidable.

Well, I thought that this new GetDevice() function was pretty
short and self-explaining. And, most of all, it actually works
as expected ;-)

Would you like to suggest a version that doesn't use bit manipulation,
is as short as the current one, and also works correctly?

Klaus


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux