On 5/28/19 2:26 PM, Roberto Ragusa wrote:
On 5/28/19 1:57 AM, John Reiser wrote:
> if ((t&=7)==0) *++ib=0; int a; (*vs_) >> a; if (a)
*ib|=static_cast<unsigned char>(1<<(7-t)); }
>
> Such code is an abomination for lack of clarity.
> Also, the preceding line
> for (int x=0,t=0; x<xs*components_; ++x,++t) {
> suggests that (7 < t) is a possibility, so (1<<(7-t)) will be
undefined,
> and the run-time bug will be hard to find.
Isn't t forced into 0..6 by the t&=7 evaluation in the first if?
0..7, sorry for mistyping.
--
Roberto Ragusa mail at robertoragusa.it