From 6d5be0fb38f93a758127491f6c81de829554bf1d Mon Sep 17 00:00:00 2001 From: Marcus Fritzsch Date: Tue, 1 Aug 2017 12:50:28 +0200 Subject: [PATCH] minor clang-format Signed-off-by: Marcus Fritzsch --- src/app.cpp | 14 +++++++------- src/layers.cpp | 16 ++++++++-------- src/layers.hpp | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/app.cpp b/src/app.cpp index 0bf4529..8c929fe 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -16,10 +16,10 @@ #include -#include -#include #include #include +#include +#include namespace wm { @@ -99,7 +99,7 @@ App::App(wl::display *d) display{d}, controller{}, outputs(), - layouts(), //load_layout("../layout.json").unwrap()), + layouts(), // load_layout("../layout.json").unwrap()), surface2layer(load_layer_ids("../ids.json").unwrap()) { // layouts(load_layout("../layout.json").unwrap()) { assert(g_app == nullptr); @@ -253,7 +253,7 @@ void App::surface_created(uint32_t surface_id) { if (h < 0) { h = c->output_size.h + 1 + h; } - logdebug("Computed rect={ %d, %d, %d, %d }", x, y, w, h); + logdebug("Computed rect={ %d, %d, %d, %d }", x, y, w, h); s->set_configuration(w, h); s->set_source_rectangle(0, 0, w, h); @@ -261,8 +261,7 @@ void App::surface_created(uint32_t surface_id) { s->set_visibility(1); c->layers[layer_id]->add_surface(s.get()); - logdebug("Surface %u now on layer %u", surface_id, - layer_id); + logdebug("Surface %u now on layer %u", surface_id, layer_id); }); } } @@ -312,7 +311,8 @@ binding_api::result_type binding_api::debug_status() { binding_api::result_type binding_api::debug_terminate() { logdebug("%s", __func__); - raise(SIGKILL); // XXX afb-daemon kills it's pgroup using TERM, which doesn't play well with perf + raise(SIGKILL); // XXX afb-daemon kills it's pgroup using TERM, which + // doesn't play well with perf return Ok(json_object_new_object()); } diff --git a/src/layers.cpp b/src/layers.cpp index 013c16a..7cc2f00 100644 --- a/src/layers.cpp +++ b/src/layers.cpp @@ -26,10 +26,8 @@ surface_id_to_layer::surface_id_to_layer(nlohmann::json const &j) { if (j["area"]["type"] == "rect") { auto jr = j["area"]["rect"]; this->rect = genivi::rect{ - get(jr["width"]), - get(jr["height"]), - get(jr["x"]), - get(jr["y"]), + get(jr["width"]), get(jr["height"]), + get(jr["x"]), get(jr["y"]), }; } } @@ -98,9 +96,10 @@ inline bool } namespace { -optional get_surface_id_to_layer(struct surface_id_to_layer_map const *s2l, int surface_id) { - auto i = std::lower_bound(std::cbegin(s2l->mapping), - std::cend(s2l->mapping), surface_id); +optional get_surface_id_to_layer( + struct surface_id_to_layer_map const *s2l, int surface_id) { + auto i = std::lower_bound(std::cbegin(s2l->mapping), std::cend(s2l->mapping), + surface_id); if (i != s2l->mapping.end()) { // std::less only checks for surface_id_to_layer::id_max, so check @@ -119,7 +118,8 @@ optional surface_id_to_layer_map::get_layer_for_surface(int surface_id) { return e ? optional(e->layer_id) : nullopt; } -optional surface_id_to_layer_map::get_rect_for_surface(int surface_id) { +optional surface_id_to_layer_map::get_rect_for_surface( + int surface_id) { auto e = get_surface_id_to_layer(this, surface_id); return e ? optional(e->rect) : nullopt; } diff --git a/src/layers.hpp b/src/layers.hpp index a827928..4291425 100644 --- a/src/layers.hpp +++ b/src/layers.hpp @@ -9,8 +9,8 @@ #include #include -#include "wayland.hpp" #include "result.hpp" +#include "wayland.hpp" namespace wm { -- 2.16.6