fix(build): Move chrono namespace to correct level

Ref #176
This commit is contained in:
Michael Carlberg 2016-11-21 00:18:08 +01:00
parent 2d66dc9a57
commit d616a7d351
2 changed files with 5 additions and 4 deletions

View File

@ -16,6 +16,9 @@
POLYBAR_NS POLYBAR_NS
namespace chrono = std::chrono;
using namespace std::chrono_literals;
#define DEFAULT_FORMAT "format" #define DEFAULT_FORMAT "format"
#define DEFINE_MODULE(name, type) struct name : public type<name> #define DEFINE_MODULE(name, type) struct name : public type<name>
@ -44,8 +47,6 @@ class builder;
// }}} // }}}
namespace modules { namespace modules {
namespace chrono = std::chrono;
using namespace std::chrono_literals;
using namespace drawtypes; using namespace drawtypes;
DEFINE_ERROR(module_error); DEFINE_ERROR(module_error);

View File

@ -7,12 +7,12 @@ POLYBAR_NS
namespace env_util { namespace env_util {
bool has(const char* var) { bool has(const char* var) {
return std::getenv(var) != nullptr; return std::getenv(var) != nullptr;
}; }
string get(const char* var, string fallback) { string get(const char* var, string fallback) {
const char* value{std::getenv(var)}; const char* value{std::getenv(var)};
return value != nullptr ? value : fallback; return value != nullptr ? value : fallback;
}; }
} }
POLYBAR_NS_END POLYBAR_NS_END