Commit 2f366292 authored by Igor Murashkin's avatar Igor Murashkin
Browse files

base: Fix integer conversion in MaskLeastSignificant, add more asserts

T x = (1 << bits) was being truncated for sizeof(T) > sizeof(bits).

Also add more static_asserts to BITSTRUCT_DEFINE_END to make it more
error-proof.

Test:  make test-art-{host,target}-gtest-bit_{struct,utils}_test{32,64}
Change-Id: Ifedf53c1211b4a9492ebd785c321a39d906dc87a
parent 797e6d4d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment