The later chunks (using i2b) are compile fixes on aarch64 (presumably with
clang6 as well). Typical error message reads
readConfig.cpp:407:54: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned char' in initializer list [-Wc++11-narrowing] unsigned char color[3] = { r & 0xff, g & 0xff, b & 0xff }; ^~~~~~~~ readConfig.cpp:407:54: note: insert an explicit cast to silence this issue unsigned char color[3] = { r & 0xff, g & 0xff, b & 0xff }; ^~~~~~~~ static_cast<unsigned char>( )
Since it happens in a half-dozen places, introduce a trivial helper function.