From 34f0540da418b01dd4d49f6ecf72569d3cfecfdf Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Sat, 25 Jan 2014 09:43:09 -0800 Subject: Implement unified config parsing (mostly) --- src/common/utils.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/common/utils.cpp') diff --git a/src/common/utils.cpp b/src/common/utils.cpp index 7f9a7ee..3a26e6d 100644 --- a/src/common/utils.cpp +++ b/src/common/utils.cpp @@ -65,28 +65,6 @@ int config_switch(ZString str) abort(); } -bool split_key_value(ZString line, XString *w1, ZString *w2) -{ - if (line.startswith("//")) - return false; - if (!line) - return false; - - if (std::find_if(line.begin(), line.end(), - [](unsigned char c) { return c < ' '; } - ) != line.end()) - return false; - ZString::iterator colon = std::find(line.begin(), line.end(), ':'); - if (colon == line.end()) - return false; - *w1 = line.xislice_h(colon); - ++colon; - while (std::isspace(*colon)) - ++colon; - *w2 = line.xislice_t(colon); - return true; -} - static_assert(sizeof(timestamp_seconds_buffer) == 20, "seconds buffer"); static_assert(sizeof(timestamp_milliseconds_buffer) == 24, "millis buffer"); -- cgit v1.2.3-70-g09d2