summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-08-08 12:04:28 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-08-08 17:30:50 +0200
commit343c700f2e1003855dfdeb4e2e7d102dc8bbe696 (patch)
tree5460dc02b588eafd151f9c5e35bce04a1d336b90 /src
parentadd2152e7561ea456068dd73ebbdc480d13e1015 (diff)
clang formatting
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src')
-rw-r--r--src/app.cpp14
-rw-r--r--src/app.hpp2
-rw-r--r--src/config.hpp8
-rw-r--r--src/layers.cpp2
-rw-r--r--src/wayland.hpp2
5 files changed, 14 insertions, 14 deletions
diff --git a/src/app.cpp b/src/app.cpp
index ac04336..6a7fc69 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -135,7 +135,7 @@ App::App(wl::display *d)
try {
{
auto l = load_layer_map(
- this->config.get_string("layers.json").value().c_str());
+ this->config.get_string("layers.json").value().c_str());
if (l.is_ok()) {
this->layers = l.unwrap();
} else {
@@ -144,8 +144,8 @@ App::App(wl::display *d)
}
{
- auto l = load_layout(
- this->config.get_string("layout.json").value().c_str());
+ auto l =
+ load_layout(this->config.get_string("layout.json").value().c_str());
if (l.is_ok()) {
this->layouts = l.unwrap();
} else {
@@ -316,7 +316,7 @@ void App::surface_set_layout(uint32_t surface_id) {
}
char const *App::activate_surface(uint32_t surface_id) {
- if (! this->controller->surface_exists(surface_id)) {
+ if (!this->controller->surface_exists(surface_id)) {
return "Surface does not exist";
}
@@ -328,7 +328,7 @@ char const *App::activate_surface(uint32_t surface_id) {
auto &s = this->controller->surfaces[surface_id];
// Set all others invisible
- for (auto &i: this->controller->surfaces) {
+ for (auto &i : this->controller->surfaces) {
auto &si = this->controller->sprops[i.second->id];
if (si.visibility == 1 && si.id != s->id &&
int(si.id) != this->layers.main_surface) {
@@ -426,7 +426,7 @@ binding_api::result_type binding_api::debug_terminate() {
}
binding_api::result_type binding_api::demo_activate_surface(
- uint32_t surfaceid) {
+ uint32_t surfaceid) {
char const *e = this->app->activate_surface(surfaceid);
if (e) {
return Err<json_object *>(e);
@@ -435,7 +435,7 @@ binding_api::result_type binding_api::demo_activate_surface(
}
binding_api::result_type binding_api::demo_activate_all() {
- for (auto &s: this->app->controller->surfaces) {
+ for (auto &s : this->app->controller->surfaces) {
s.second->set_visibility(1);
}
this->app->controller->commit_changes();
diff --git a/src/app.hpp b/src/app.hpp
index be155a9..1926ca4 100644
--- a/src/app.hpp
+++ b/src/app.hpp
@@ -21,12 +21,12 @@
#include <memory>
#include "afb_binding_api.hpp"
+#include "config.hpp"
#include "controller_hooks.hpp"
#include "layers.hpp"
#include "layout.hpp"
#include "result.hpp"
#include "wayland.hpp"
-#include "config.hpp"
namespace wl {
struct display;
diff --git a/src/config.hpp b/src/config.hpp
index d1e2322..d470b85 100644
--- a/src/config.hpp
+++ b/src/config.hpp
@@ -17,8 +17,8 @@
#ifndef TMCAGLWM_CONFIG_HPP
#define TMCAGLWM_CONFIG_HPP
-#include <map>
#include <experimental/optional>
+#include <map>
namespace wm {
@@ -39,11 +39,11 @@ struct config {
optional<int> get_int(char const *s) {
auto i = this->cfg.find(s);
- return i != this->cfg.end() ? optional<int>(std::stoi(i->second)) : nullopt;
+ return i != this->cfg.end() ? optional<int>(std::stoi(i->second))
+ : nullopt;
}
};
} // namespace wm
-
-#endif //TMCAGLWM_CONFIG_HPP
+#endif // TMCAGLWM_CONFIG_HPP
diff --git a/src/layers.cpp b/src/layers.cpp
index 55d3d3f..3205323 100644
--- a/src/layers.cpp
+++ b/src/layers.cpp
@@ -162,7 +162,7 @@ json layer::to_json() const {
json layer_map::to_json() const {
json j{};
- for (auto const &i: this->mapping) {
+ for (auto const &i : this->mapping) {
j.push_back(i.to_json());
}
return j;
diff --git a/src/wayland.hpp b/src/wayland.hpp
index 85423fd..9ad5656 100644
--- a/src/wayland.hpp
+++ b/src/wayland.hpp
@@ -147,7 +147,7 @@ struct rect {
static const constexpr rect full_rect = rect{-1, -1, 0, 0};
-inline bool operator == (struct rect a, struct rect b) {
+inline bool operator==(struct rect a, struct rect b) {
return a.w == b.w && a.h == b.h && a.x == b.x && a.y == b.y;
}