aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/command_classes/vic.cpp
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2020-11-14 19:01:33 -0500
committercomex <comexk@gmail.com>2020-12-06 18:24:16 -0500
commit38f4b34610edbd6f01b6aeddec8199e9d9d7542e (patch)
treefac5e530d480f1127d2eeec90ef7ae031f245e51 /src/video_core/command_classes/vic.cpp
parent722001f513e1642e39ab0fb6aceafa8526abc097 (diff)
video_core: Adjust `NUM` macro to avoid Clang warning
The previous definition was: #define NUM(field_name) (sizeof(Maxwell3D::Regs::field_name) / sizeof(u32)) In cases where `field_name` happens to refer to an array, Clang thinks `sizeof(an array value) / sizeof(a type)` is an instance of the idiom where `sizeof` is used to compute an array length. So it thinks the type in the denominator ought to be the array element type, and warns if it isn't, assuming this is a mistake. In reality, `NUM` is not used to get array lengths at all, so there is no mistake. Silence the warning by applying Clang's suggested workaround of parenthesizing the denominator.
Diffstat (limited to 'src/video_core/command_classes/vic.cpp')
0 files changed, 0 insertions, 0 deletions