layers: remove priority from split layout definition
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>
Wed, 13 Sep 2017 10:48:07 +0000 (12:48 +0200)
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>
Thu, 14 Sep 2017 12:04:51 +0000 (14:04 +0200)
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
src/layers.cpp
src/layers.hpp

index 5b28c15..9219766 100644 (file)
@@ -43,20 +43,14 @@ layer::layer(nlohmann::json const &j) {
       std::transform(std::cbegin(sls), std::cend(sls),
                      std::back_inserter(this->layouts), [this](json const &sl) {
                         struct split_layout l {
       std::transform(std::cbegin(sls), std::cend(sls),
                      std::back_inserter(this->layouts), [this](json const &sl) {
                         struct split_layout l {
-                           sl["name"], sl["main_match"], sl["sub_match"],
-                              sl.value<int>("priority", 0)
-                        };
+                           sl["name"], sl["main_match"], sl["sub_match"] };
                         logdebug(
                            "layer %d add split_layout \"%s\" (main: \"%s\") (sub: "
                         logdebug(
                            "layer %d add split_layout \"%s\" (main: \"%s\") (sub: "
-                           "\"%s\") (prio: %d)", this->layer_id,
+                           "\"%s\")", this->layer_id,
                            l.name.c_str(), l.main_match.c_str(),
                            l.name.c_str(), l.main_match.c_str(),
-                           l.sub_match.c_str(), l.prio);
+                           l.sub_match.c_str());
                         return l;
                      });
                         return l;
                      });
-      //std::sort(std::begin(this->layouts), std::end(this->layouts),
-      //          [](struct split_layout const &a, struct split_layout const &b) {
-      //             return a.prio < b.prio;
-      //          });
    }
 }
 
    }
 }
 
index 5d085a0..0603d24 100644 (file)
@@ -33,7 +33,6 @@ struct split_layout {
    std::string name;
    std::string main_match;
    std::string sub_match;
    std::string name;
    std::string main_match;
    std::string sub_match;
-   int prio;  // no entirely sure we will use this
 };
 
 struct layer {
 };
 
 struct layer {