Checklist
Description
Analyzer message:
V634 The priority of the * operation is higher than that of the << operation. It`s possible that parentheses should be used in the expression. liverpool_to_vk.cpp 759
Suspicious expression and it's easy to break something due to operator precedence. Requires a comment\simplification.
// Table 8.13 Data and Image Formats [Sea Islands Series Instruction Set Architecture]
static const size_t amd_gpu_data_format_bit_size = 6; // All values are under 64
static const size_t amd_gpu_number_format_bit_size = 4; // All values are under 16
static auto surface_format_table = []() constexpr {
std::array<vk::Format, 1 << amd_gpu_data_format_bit_size * 1 << amd_gpu_number_format_bit_size>
result;
for (auto& entry : result) {
entry = vk::Format::eUndefined;
}
for (const auto& supported_format : SurfaceFormats()) {
result[GetSurfaceFormatTableIndex(supported_format.data_format,
supported_format.number_format)] =
supported_format.vk_format;
}
return result;
}();
Link to an article with additional information: https://pvs-studio.com/en/blog/posts/cpp/1405/
Reason
Fixing potential bug and\or code quality.
Examples
No response
Checklist
Description
Analyzer message:
V634 The priority of the
*operation is higher than that of the<<operation. It`s possible that parentheses should be used in the expression. liverpool_to_vk.cpp 759Suspicious expression and it's easy to break something due to operator precedence. Requires a comment\simplification.
Link to an article with additional information: https://pvs-studio.com/en/blog/posts/cpp/1405/
Reason
Fixing potential bug and\or code quality.
Examples
No response