summaryrefslogtreecommitdiff
path: root/src/buffer_utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer_utils.cc')
-rw-r--r--src/buffer_utils.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buffer_utils.cc b/src/buffer_utils.cc
index 996f6be5..effb7cc7 100644
--- a/src/buffer_utils.cc
+++ b/src/buffer_utils.cc
@@ -97,12 +97,12 @@ static BufferLines parse_lines(const char* pos, const char* end, EolFormat eolfo
if ((eol - pos) >= std::numeric_limits<int>::max())
throw runtime_error("line is too long");
- lines.emplace_back(StringData::create({{pos, eol - (eolformat == EolFormat::Crlf and eol != end ? 1 : 0)}, "\n"}));
+ lines.emplace_back(StringData::create(StringView{pos, eol - (eolformat == EolFormat::Crlf and eol != end ? 1 : 0)}, "\n"));
pos = eol + 1;
}
if (lines.empty())
- lines.emplace_back(StringData::create({"\n"}));
+ lines.emplace_back(StringData::create("\n"));
return lines;
}
@@ -179,12 +179,12 @@ Buffer* create_fifo_buffer(String name, int fd, Buffer::Flags flags, bool scroll
{
buffer->flags() |= Buffer::Flags::NoUndo | flags;
buffer->values().clear();
- buffer->reload({StringData::create({"\n"})}, ByteOrderMark::None, EolFormat::Lf, {InvalidTime, {}, {}});
+ buffer->reload({StringData::create("\n")}, ByteOrderMark::None, EolFormat::Lf, {InvalidTime, {}, {}});
}
else
buffer = buffer_manager.create_buffer(
std::move(name), flags | Buffer::Flags::Fifo | Buffer::Flags::NoUndo,
- {StringData::create({"\n"})}, ByteOrderMark::None, EolFormat::Lf, {InvalidTime, {}, {}});
+ {StringData::create("\n")}, ByteOrderMark::None, EolFormat::Lf, {InvalidTime, {}, {}});
struct FifoWatcher : FDWatcher
{