From d616a7d3510a18c8bec69181167a0d405b91c48b Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Mon, 21 Nov 2016 00:18:08 +0100 Subject: [PATCH] fix(build): Move chrono namespace to correct level Ref #176 --- include/modules/meta/base.hpp | 5 +++-- src/utils/env.cpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/modules/meta/base.hpp b/include/modules/meta/base.hpp index 7a11a858..bd56f086 100644 --- a/include/modules/meta/base.hpp +++ b/include/modules/meta/base.hpp @@ -16,6 +16,9 @@ POLYBAR_NS +namespace chrono = std::chrono; +using namespace std::chrono_literals; + #define DEFAULT_FORMAT "format" #define DEFINE_MODULE(name, type) struct name : public type @@ -44,8 +47,6 @@ class builder; // }}} namespace modules { - namespace chrono = std::chrono; - using namespace std::chrono_literals; using namespace drawtypes; DEFINE_ERROR(module_error); diff --git a/src/utils/env.cpp b/src/utils/env.cpp index 77697416..393f978f 100644 --- a/src/utils/env.cpp +++ b/src/utils/env.cpp @@ -7,12 +7,12 @@ POLYBAR_NS namespace env_util { bool has(const char* var) { return std::getenv(var) != nullptr; - }; + } string get(const char* var, string fallback) { const char* value{std::getenv(var)}; return value != nullptr ? value : fallback; - }; + } } POLYBAR_NS_END