Open gumb0 opened 3 years ago
Similar case:
static void WriteICCUint32(uint32_t value, size_t pos,
std::vector<uint8_t>* icc) {
if (icc->size() < pos + 4) icc->resize(pos + 4);
(*icc)[pos + 0] = (value >> 24u) & 255;
(*icc)[pos + 1] = (value >> 16u) & 255;
(*icc)[pos + 2] = (value >> 8u) & 255;
(*icc)[pos + 3] = value & 255;
}
clang-tidy claims icc
can be const...
Extended Description
For the following code:
clang-tidy generates the warning:
It can't be const though, because it's passed to a function taking non-const reference.
https://godbolt.org/z/YGxKPG