diff options
| author | Maxime Coste <mawww@kakoune.org> | 2024-02-28 19:00:51 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2024-02-28 19:02:29 +1100 |
| commit | 3d5a0c672e6f3cf87944b33712e17531aa42c607 (patch) | |
| tree | d402461b8d6517072b27e653d1201888366718a8 /src/buffer_manager.cc | |
| parent | 57b794ede3cae1e7c21309869a2c617481a55acf (diff) | |
Templatize StringData::create
This improves performance by letting the compiler optimize most use
cases where string count and length are known are compile time.
Diffstat (limited to 'src/buffer_manager.cc')
| -rw-r--r-- | src/buffer_manager.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buffer_manager.cc b/src/buffer_manager.cc index 32d03fc1..22ccf366 100644 --- a/src/buffer_manager.cc +++ b/src/buffer_manager.cc @@ -83,8 +83,8 @@ Buffer& BufferManager::get_first_buffer() { if (all_of(m_buffers, [](auto& b) { return (b->flags() & Buffer::Flags::Debug); })) create_buffer("*scratch*", Buffer::Flags::None, - {StringData::create({"*** this is a *scratch* buffer which won't be automatically saved ***\n"}), - StringData::create({"*** use it for notes or open a file buffer with the :edit command ***\n"})}, + {StringData::create("*** this is a *scratch* buffer which won't be automatically saved ***\n"), + StringData::create("*** use it for notes or open a file buffer with the :edit command ***\n")}, ByteOrderMark::None, EolFormat::Lf, {InvalidTime, {}, {}}); return *m_buffers.back(); |
