mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 17:40:11 +01:00
nir: fix const-cast warning on MSVC
We're casting pointers to const memory to const pointers. MSVC complains
about this with the following warning:
warning C4090: 'initializing': different 'const' qualifiers
In this case, we can easily use both constnesses, because all we do is
read here. So let's avoid the warning by adding another const-keyword.
Fixes: 193765e26b ("nir/lower_goto_if: Sort blocks in select_fork")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6582>
This commit is contained in:
parent
0f4d09443e
commit
aaa492e6c6
1 changed files with 2 additions and 2 deletions
|
|
@ -85,8 +85,8 @@ struct strct_lvl {
|
|||
static int
|
||||
nir_block_ptr_cmp(const void *_a, const void *_b)
|
||||
{
|
||||
nir_block *const *a = _a;
|
||||
nir_block *const *b = _b;
|
||||
const nir_block *const *a = _a;
|
||||
const nir_block *const *b = _b;
|
||||
return (int)(*a)->index - (int)(*b)->index;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue