summaryrefslogtreecommitdiff
path: root/src/string.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/string.hh')
-rw-r--r--src/string.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/string.hh b/src/string.hh
index 56771c65..1a3568e0 100644
--- a/src/string.hh
+++ b/src/string.hh
@@ -178,7 +178,8 @@ public:
} s;
Data() { set_empty(); }
- Data(NoCopy, const char* data, size_t size);
+ Data(NoCopy, const char* data, size_t size) : l{const_cast<char*>(data), size, 0} {}
+
Data(const char* data, size_t size, size_t capacity);
Data(const char* data, size_t size) : Data(data, size, size) {}
Data(const Data& other) : Data{other.data(), other.size()} {}