From ad3960e050cc07873db45170d365c9cdaa27294c Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Thu, 12 Dec 2019 18:04:27 -0500 Subject: [PATCH] fix(build): GCC 6.3 discarded qualifiers (#1953) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the below error: /code/polybar/src/components/controller.cpp:110:117: required from here /code/polybar/src/components/controller.cpp:100:60: error: passing ‘const volatile std::shared_ptr’ as ‘this’ argument discards qualifiers [-fpermissive] auto equal_predicate = [](auto& m1, auto& m2) { return m1->name() == m2->name(); }; --- src/components/controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/controller.cpp b/src/components/controller.cpp index a85e6f7f..2bd37de1 100644 --- a/src/components/controller.cpp +++ b/src/components/controller.cpp @@ -97,7 +97,7 @@ controller::controller(connection& conn, signal_emitter& emitter, const logger& auto dup_it = m_modules.cbegin(); do { - auto equal_predicate = [](const auto& m1, const auto& m2) { return m1->name() == m2->name(); }; + auto equal_predicate = [](const module_t& m1, const module_t& m2) { return m1->name() == m2->name(); }; dup_it = std::adjacent_find(dup_it, m_modules.cend(), equal_predicate); if (dup_it != m_modules.cend()) {