Предупреждение от IDE

IDE сообщает для ~(start_mask | finish_mask), result >>= start_bit_vector; (на result) и (this->v):

Clang-Tidy: Use of a signed integer operand with a unary bitwise operator

Как поравить? Код:

unsigned int dim;
unsigned int size;
std::vector<base_t> v;

typedef short int base_t;
typedef unsigned char size_base_t;

...

unsigned int index;
size_base_t start_bit = this->dim * index; // absolute indexing in bits
size_base_t start_bit_vector = start_bit % this->size;

base_t start_mask = (1u << start_bit_vector) - 1;

base_t result_mask = ~(start_mask | finish_mask);
base_t result = ((this->v)[start_index] & result_mask);
result >>= start_bit_vector;

Ответы (0 шт):