diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-04-14 01:17:09 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-04-14 01:17:09 +0000 |
| commit | 93379384036dadada06139245d1e4eca13cabebd (patch) | |
| tree | 0f5475fd2c7fc212982d881b67444b20a0f8f809 /src/buffer.cc | |
| parent | af5c528f043f663b94ce197b0c70ddb3da9224e8 (diff) | |
replace std::string references with String
Diffstat (limited to 'src/buffer.cc')
| -rw-r--r-- | src/buffer.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buffer.cc b/src/buffer.cc index f046ede9..597c2981 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -22,7 +22,7 @@ T clamp(T min, T max, T val) return val; } -Buffer::Buffer(const std::string& name, Type type, +Buffer::Buffer(const String& name, Type type, const String& initial_content) : m_name(name), m_type(type), m_history(1), m_history_cursor(m_history.begin()), @@ -301,10 +301,10 @@ void Buffer::apply_modification(const Modification& modification) } case Modification::Erase: { - size_t size = modification.content.size(); - assert(string(modification.position, modification.position + size) + size_t count = modification.content.length(); + assert(string(modification.position, modification.position + count) == modification.content); - erase(modification.position, size); + erase(modification.position, count); break; } default: |
