[PATCH] "remove"? I don't think that algorithm does what you think it does
authorAlan Griffiths <alan@octopull.co.uk>
Tue, 19 Mar 2024 10:30:13 +0000 (10:30 +0000)
committerMike Gabriel <sunweaver@debian.org>
Sun, 22 Sep 2024 11:53:43 +0000 (13:53 +0200)
Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Gbp-Pq: Name 0001_remove-I-don-t-think-that-algorithm-does-what-you-th.patch

tests/wlr_foreign_toplevel_management_v1.cpp

index b824d3db0cbcb03d9c62472f9a0a54497f27ad6b..b7a59de9c4e5ec0b12118f345fd912bb2f5d40c7 100644 (file)
@@ -110,10 +110,7 @@ ForeignToplevelHandle::ForeignToplevelHandle(zwlr_foreign_toplevel_handle_v1* ha
             wl_output* output)
             {
                 auto self = get_self(data);
-                std::remove(
-                    self->outputs_.begin(),
-                    self->outputs_.end(),
-                    output);
+                std::erase(self->outputs_, output);
                 self->dirty_ = true;
             },
         [] /*state */ (