Parcourir la source

WindowServer+LibGUI+LibHTML: Fix build with -std=c++2a

Andreas Kling il y a 5 ans
Parent
commit
ef38c49619

+ 1 - 1
Libraries/LibGUI/MessageBox.cpp

@@ -129,7 +129,7 @@ void MessageBox::build()
         button->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
         button->set_preferred_size(0, 20);
         button->set_text(label);
-        button->on_click = [=](auto&) {
+        button->on_click = [this, label, result](auto&) {
             dbg() << "GUI::MessageBox: '" << label << "' button clicked";
             done(result);
         };

+ 1 - 1
Libraries/LibHTML/HtmlView.cpp

@@ -332,7 +332,7 @@ void HtmlView::load(const URL& url)
     if (on_load_start)
         on_load_start(url);
 
-    ResourceLoader::the().load(url, [=](auto data) {
+    ResourceLoader::the().load(url, [this, url](auto data) {
         if (data.is_null()) {
             dbg() << "Load failed!";
             ASSERT_NOT_REACHED();

+ 1 - 1
Servers/WindowServer/Compositor.cpp

@@ -75,7 +75,7 @@ Compositor::Compositor()
     };
     m_compose_timer->set_single_shot(true);
     m_compose_timer->set_interval(1000 / 60);
-    m_immediate_compose_timer->on_timeout = [=]() {
+    m_immediate_compose_timer->on_timeout = [this]() {
 #if defined(COMPOSITOR_DEBUG)
         dbgprintf("Compositor: immediate frame callback: %d rects\n", m_dirty_rects.size());
 #endif