From c29e4837dfaf44cf160c53a22b3d93c460b026b8 Mon Sep 17 00:00:00 2001
From: patrick96
Date: Mon, 13 Sep 2021 20:54:00 +0200
Subject: [PATCH] clang-format
---
src/components/config.cpp | 5 ++++-
src/components/controller.cpp | 4 +---
src/components/screen.cpp | 15 +++++++--------
src/ipc.cpp | 1 +
4 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/src/components/config.cpp b/src/components/config.cpp
index 49657356..2748a6b4 100644
--- a/src/components/config.cpp
+++ b/src/components/config.cpp
@@ -58,7 +58,10 @@ void config::set_included(file_list included) {
void config::ignore_key(const string& section, const string& key) const {
if (has(section, key)) {
- m_log.warn("The config parameter '%s.%s' is deprecated, it will be removed in the future. Please remove it from your config", section, key);
+ m_log.warn(
+ "The config parameter '%s.%s' is deprecated, it will be removed in the future. Please remove it from your "
+ "config",
+ section, key);
}
}
diff --git a/src/components/controller.cpp b/src/components/controller.cpp
index d090f259..e9f4835b 100644
--- a/src/components/controller.cpp
+++ b/src/components/controller.cpp
@@ -253,9 +253,7 @@ void controller::read_events(bool confwatch) {
if (confwatch) {
eloop->fs_event_handle(
m_conf.filepath(), [this](const char* path, uv_fs_event events) { confwatch_handler(path, events); },
- [this](int err) {
- m_log.err("libuv error while watching config file for changes: %s", uv_strerror(err));
- });
+ [this](int err) { m_log.err("libuv error while watching config file for changes: %s", uv_strerror(err)); });
}
if (m_ipc) {
diff --git a/src/components/screen.cpp b/src/components/screen.cpp
index 034bec33..1e1076b7 100644
--- a/src/components/screen.cpp
+++ b/src/components/screen.cpp
@@ -1,10 +1,11 @@
-#include
+#include "components/screen.hpp"
+
#include
+#include
#include
#include "components/config.hpp"
#include "components/logger.hpp"
-#include "components/screen.hpp"
#include "components/types.hpp"
#include "events/signal.hpp"
#include "events/signal_emitter.hpp"
@@ -121,22 +122,20 @@ void screen::handle(const evt::randr_screen_change_notify& evt) {
bool screen::have_monitors_changed() const {
auto monitors = randr_util::get_monitors(m_connection, m_root, true, false);
- if(monitors.size() != m_monitors.size()) {
+ if (monitors.size() != m_monitors.size()) {
return true;
}
for (auto m : m_monitors) {
- auto it = std::find_if(monitors.begin(), monitors.end(),
- [m] (auto& monitor) -> bool {
- return m->equals(*monitor);
- });
+ auto it =
+ std::find_if(monitors.begin(), monitors.end(), [m](auto& monitor) -> bool { return m->equals(*monitor); });
/*
* Every monitor in the stored list should also exist in the newly fetched
* list. If this holds then the two lists are equivalent since they have
* the same size
*/
- if(it == monitors.end()) {
+ if (it == monitors.end()) {
return true;
}
}
diff --git a/src/ipc.cpp b/src/ipc.cpp
index 333d4952..2abcaa59 100644
--- a/src/ipc.cpp
+++ b/src/ipc.cpp
@@ -1,4 +1,5 @@
#include
+
#include
#include
#include