Fix compilation on clang

This commit is contained in:
Maxime Coste 2015-03-12 13:02:46 +00:00
parent 348e23dd8a
commit f2b8b1ae2b
2 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ void register_env_vars()
{ return context.buffer().display_name(); }
}, {
"buffile",
[](StringView name, const Context& context)
[](StringView name, const Context& context) -> String
{ return context.buffer().name(); }
}, {
"buflist",
@ -93,11 +93,11 @@ void register_env_vars()
{ return context.client().get_env_var(name.substr(11_byte)).str(); }
}, {
"session",
[](StringView name, const Context& context)
[](StringView name, const Context& context) -> String
{ return Server::instance().session(); }
}, {
"client",
[](StringView name, const Context& context)
[](StringView name, const Context& context) -> String
{ return context.name(); }
}, {
"cursor_line",

View File

@ -106,7 +106,7 @@ public:
using Content = std::basic_string<char, std::char_traits<char>,
Allocator<char, MemoryDomain::String>>;
String() = default;
String() {}
String(const char* content) : m_data(content) {}
explicit String(char content, CharCount count = 1) : m_data((size_t)(int)count, content) {}
explicit String(Codepoint cp, CharCount count = 1)