Mesa (main): nir/tests: do not use designated initializers in c++ code

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 5 17:26:48 UTC 2022


Module: Mesa
Branch: main
Commit: ed399a179e34dde21fcc6cd6b1fab8a82bb62884
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ed399a179e34dde21fcc6cd6b1fab8a82bb62884

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Fri Apr  1 10:34:11 2022 +0200

nir/tests: do not use designated initializers in c++ code

Designated initializers require C++20, which is a bit easier said than
done to support well across meson versions. Let's avoid using them
for now instead.

Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang at gmail.com>
Acked-by: Jason Ekstrand <jason.ekstrand at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15706>

---

 src/compiler/nir/tests/core_tests.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/compiler/nir/tests/core_tests.cpp b/src/compiler/nir/tests/core_tests.cpp
index d243396d68e..0d5820e6b3f 100644
--- a/src/compiler/nir/tests/core_tests.cpp
+++ b/src/compiler/nir/tests/core_tests.cpp
@@ -80,8 +80,7 @@ nir_core_test::shader_contains_def(nir_ssa_def *def)
    nir_foreach_block(block, b->impl) {
       nir_foreach_instr(instr, block) {
          struct contains_def_state state = {
-            .def = def,
-            .found = false,
+            def, false
          };
          nir_foreach_ssa_def(instr, contains_def_cb, &state);
          if (state.found)



More information about the mesa-commit mailing list