mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
nvk: Rename macro loop index from i to _index
Calling this varaible `i` made it very easy for it to shadow a loop variable in the enclosing scope, which became an issue if `src` were an expression referencing a different variable `i`. Rename the variable to make shadowing less likely. Reviewed-by: Mary Guillemard <mary@mary.zone> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40639>
This commit is contained in:
parent
3476b34f63
commit
54b41565a0
1 changed files with 4 additions and 4 deletions
|
|
@ -110,8 +110,8 @@ struct nvk_descriptor_state {
|
|||
unsigned _start = start; \
|
||||
unsigned _count = count; \
|
||||
assert(_start + _count <= ARRAY_SIZE(root->member)); \
|
||||
for (unsigned i = 0; i < _count; i++) \
|
||||
(dst)[i] = root->member[i + _start]; \
|
||||
for (unsigned _index = 0; _index < _count; _index++) \
|
||||
(dst)[_index] = root->member[_index + _start]; \
|
||||
} while (0)
|
||||
|
||||
#define nvk_descriptor_state_set_root(cmd, desc, member, src) do { \
|
||||
|
|
@ -133,8 +133,8 @@ struct nvk_descriptor_state {
|
|||
unsigned _start = start; \
|
||||
unsigned _count = count; \
|
||||
assert(_start + _count <= ARRAY_SIZE(root->member)); \
|
||||
for (unsigned i = 0; i < _count; i++) \
|
||||
root->member[i + _start] = (src)[i]; \
|
||||
for (unsigned _index = 0; _index < _count; _index++) \
|
||||
root->member[_index + _start] = (src)[_index]; \
|
||||
if (_desc->flush_root != NULL) { \
|
||||
size_t offset = (char *)&root->member[_start] - (char *)root; \
|
||||
_desc->flush_root((cmd), _desc, offset, \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue