From ca0d74ac01d2a30af6586222906c034b4b5e1f73 Mon Sep 17 00:00:00 2001 From: Arthur Sonzogni Date: Sun, 16 May 2021 09:57:55 +0200 Subject: [PATCH] Warn for deprecated. (#94) --- CMakeLists.txt | 1 + src/ftxui/component/screen_interactive.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fedfbf1..22b3782 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -157,6 +157,7 @@ foreach(lib screen dom component) target_compile_options(${lib} PRIVATE "-pedantic") target_compile_options(${lib} PRIVATE "-Werror") target_compile_options(${lib} PRIVATE "-Wmissing-declarations") + target_compile_options(${lib} PRIVATE "-Wdeprecated") endif() endforeach() diff --git a/src/ftxui/component/screen_interactive.cpp b/src/ftxui/component/screen_interactive.cpp index f1318ee..786f40a 100644 --- a/src/ftxui/component/screen_interactive.cpp +++ b/src/ftxui/component/screen_interactive.cpp @@ -360,7 +360,7 @@ void ScreenInteractive::Loop(Component component) { // On exit, reset cursor one line after the current drawing. on_exit_functions.push( - [=] { std::cout << reset_cursor_position << std::endl; }); + [this] { std::cout << reset_cursor_position << std::endl; }); disable({ DECMode::kCursor,