summaryrefslogtreecommitdiff
path: root/src/buffer.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-01-15 13:54:38 +0000
committerMaxime Coste <frrrwww@gmail.com>2015-01-15 19:26:38 +0000
commit76d806e98d5e80f7f0c233d561371b89b8724c23 (patch)
treefa93543d091e89045c04766ce7854d3f125ab3dd /src/buffer.hh
parent2a878d51fdfe5832a3b979dbc8e5b2144ad0d1f3 (diff)
Replace InternedStrings with SharedString, shared_ptr based
Diffstat (limited to 'src/buffer.hh')
-rw-r--r--src/buffer.hh10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/buffer.hh b/src/buffer.hh
index f66e364f..1f7fee83 100644
--- a/src/buffer.hh
+++ b/src/buffer.hh
@@ -5,7 +5,7 @@
#include "flags.hh"
#include "safe_ptr.hh"
#include "scope.hh"
-#include "interned_string.hh"
+#include "shared_string.hh"
#include "value.hh"
#include "vector.hh"
@@ -121,7 +121,7 @@ public:
BufferIterator end() const;
LineCount line_count() const;
- const InternedString& operator[](LineCount line) const
+ const SharedString& operator[](LineCount line) const
{ return m_lines[line]; }
// returns an iterator at given coordinates. clamp line_and_column
@@ -166,15 +166,15 @@ private:
void on_option_changed(const Option& option) override;
- using LineListBase = Vector<InternedString, MemoryDomain::BufferContent>;
+ using LineListBase = Vector<SharedString, MemoryDomain::BufferContent>;
struct LineList : LineListBase
{
[[gnu::always_inline]]
- InternedString& operator[](LineCount line)
+ SharedString& operator[](LineCount line)
{ return LineListBase::operator[]((int)line); }
[[gnu::always_inline]]
- const InternedString& operator[](LineCount line) const
+ const SharedString& operator[](LineCount line) const
{ return LineListBase::operator[]((int)line); }
};
LineList m_lines;