Code Review
/
staging
/
windowmanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Remove the DB() makro, replace with logdebug() where sensible
[staging/windowmanager.git]
/
src
/
layers.cpp
diff --git
a/src/layers.cpp
b/src/layers.cpp
index
2209847
..
0110f17
100644
(file)
--- a/
src/layers.cpp
+++ b/
src/layers.cpp
@@
-25,7
+25,6
@@
namespace wm {
using json = nlohmann::json;
layer::layer(nlohmann::json const &j) {
using json = nlohmann::json;
layer::layer(nlohmann::json const &j) {
- DB(j);
if (j["type"] == "range") {
this->id_min = j["first_surface_id"];
this->id_max = j["last_surface_id"];
if (j["type"] == "range") {
this->id_min = j["first_surface_id"];
this->id_max = j["last_surface_id"];
@@
-45,7
+44,6
@@
layer::layer(nlohmann::json const &j) {
}
struct result<struct layer_map> to_layer_map(nlohmann::json const &j) {
}
struct result<struct layer_map> to_layer_map(nlohmann::json const &j) {
- DB(j);
try {
layer_map stl{};
auto m = j["mappings"];
try {
layer_map stl{};
auto m = j["mappings"];
@@
-76,7
+74,7
@@
struct result<struct layer_map> to_layer_map(nlohmann::json const &j) {
auto jtests = j.value("tests", json());
if (!jtests.empty()) {
auto jtests = j.value("tests", json());
if (!jtests.empty()) {
-
DB
("Embedded tests...");
+
logdebug
("Embedded tests...");
std::vector<std::pair<int, int>> tests;
tests.reserve(jtests.size());
std::transform(std::cbegin(jtests), std::cend(jtests),
std::vector<std::pair<int, int>> tests;
tests.reserve(jtests.size());
std::transform(std::cbegin(jtests), std::cend(jtests),
@@
-88,8
+86,7
@@
struct result<struct layer_map> to_layer_map(nlohmann::json const &j) {
for (auto sid : tests) {
int lid = stl.get_layer_id(sid.first).value_or(-1);
for (auto sid : tests) {
int lid = stl.get_layer_id(sid.first).value_or(-1);
- DB("this=" << sid.first << ", that=" << lid
- << ", expect=" << sid.second);
+ logdebug("this=%d, that=%d, expect=%d", sid.first, lid, sid.second);
if (lid != sid.second) {
return Err<layer_map>("ID Map embedded test failed!");
}
if (lid != sid.second) {
return Err<layer_map>("ID Map embedded test failed!");
}