clang-format

This commit is contained in:
patrick96 2021-09-13 20:54:00 +02:00 committed by Patrick Ziegler
parent 21f6f7818a
commit c29e4837df
4 changed files with 13 additions and 12 deletions

View File

@ -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);
}
}

View File

@ -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) {

View File

@ -1,10 +1,11 @@
#include <csignal>
#include "components/screen.hpp"
#include <algorithm>
#include <csignal>
#include <thread>
#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;
}
}

View File

@ -1,4 +1,5 @@
#include <fcntl.h>
#include <algorithm>
#include <cstdlib>
#include <cstring>