diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-04-30 19:07:32 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-04-30 19:07:32 +0100 |
| commit | 144a35be3076cc1e7c82b89e62d768693fd9f2f3 (patch) | |
| tree | be512f82afce9ebb8f435264f8bc3335475c0359 /src | |
| parent | b1ba7fc4d23e8f68eeadcdd4622c10f8caed19e1 (diff) | |
Fix clang compilation
Diffstat (limited to 'src')
| -rw-r--r-- | src/commands.cc | 2 | ||||
| -rw-r--r-- | src/string.hh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/commands.cc b/src/commands.cc index d06f75b8..2523d0c0 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -832,7 +832,7 @@ const CommandDesc declare_option_cmd = { else if (parser[0] == "str") opt = &opts.declare_option<String>(parser[1], docstring, "", flags); else if (parser[0] == "regex") - opt = &opts.declare_option<Regex>(parser[1], docstring, {}, flags); + opt = &opts.declare_option<Regex>(parser[1], docstring, Regex{}, flags); else if (parser[0] == "int-list") opt = &opts.declare_option<std::vector<int>>(parser[1], docstring, {}, flags); else if (parser[0] == "str-list") diff --git a/src/string.hh b/src/string.hh index 954436e4..eb241e76 100644 --- a/src/string.hh +++ b/src/string.hh @@ -65,7 +65,7 @@ public: constexpr StringView() : m_data{nullptr}, m_length{0} {} constexpr StringView(const char* data, ByteCount length) : m_data{data}, m_length{length} {} - constexpr StringView(const char* data) : m_data{data}, m_length{(int)strlen(data)} {} + StringView(const char* data) : m_data{data}, m_length{(int)strlen(data)} {} constexpr StringView(const char* begin, const char* end) : m_data{begin}, m_length{(int)(end - begin)} {} StringView(const String& str) : m_data{str.data()}, m_length{str.length()} {} |
