- remove paranthese warning
- remove redundant double negation, as the type is already bool - replaced inline condition with cast closes #2491 git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1270 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -278,14 +278,14 @@ public:
|
||||
|
||||
for (bidx=idx=0; idx < N; ++idx, bidx+=8)
|
||||
{
|
||||
bits = !!data_[bidx]
|
||||
| (!!data_[bidx+1] << 1)
|
||||
| (!!data_[bidx+2] << 2)
|
||||
| (!!data_[bidx+3] << 3)
|
||||
| (!!data_[bidx+4] << 4)
|
||||
| (!!data_[bidx+5] << 5)
|
||||
| (!!data_[bidx+6] << 6)
|
||||
| (!!data_[bidx+7] << 7);
|
||||
bits = static_cast<unsigned char>(data_[bidx])
|
||||
| (static_cast<unsigned char>(data_[bidx+1]) << 1)
|
||||
| (static_cast<unsigned char>(data_[bidx+2]) << 2)
|
||||
| (static_cast<unsigned char>(data_[bidx+3]) << 3)
|
||||
| (static_cast<unsigned char>(data_[bidx+4]) << 4)
|
||||
| (static_cast<unsigned char>(data_[bidx+5]) << 5)
|
||||
| (static_cast<unsigned char>(data_[bidx+6]) << 6)
|
||||
| (static_cast<unsigned char>(data_[bidx+7]) << 7);
|
||||
_ostr << bits;
|
||||
}
|
||||
bytes = N;
|
||||
@@ -320,14 +320,14 @@ public:
|
||||
for (bidx=idx=0; idx < N; ++idx, bidx+=8)
|
||||
{
|
||||
_istr >> bits;
|
||||
data_[bidx+0] = !!(bits & 0x01);
|
||||
data_[bidx+1] = !!(bits & 0x02);
|
||||
data_[bidx+2] = !!(bits & 0x04);
|
||||
data_[bidx+3] = !!(bits & 0x08);
|
||||
data_[bidx+4] = !!(bits & 0x10);
|
||||
data_[bidx+5] = !!(bits & 0x20);
|
||||
data_[bidx+6] = !!(bits & 0x40);
|
||||
data_[bidx+7] = !!(bits & 0x80);
|
||||
data_[bidx+0] = (bits & 0x01) != 0;
|
||||
data_[bidx+1] = (bits & 0x02) != 0;
|
||||
data_[bidx+2] = (bits & 0x04) != 0;
|
||||
data_[bidx+3] = (bits & 0x08) != 0;
|
||||
data_[bidx+4] = (bits & 0x10) != 0;
|
||||
data_[bidx+5] = (bits & 0x20) != 0;
|
||||
data_[bidx+6] = (bits & 0x40) != 0;
|
||||
data_[bidx+7] = (bits & 0x80) != 0;
|
||||
}
|
||||
bytes = N;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user