mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-25 04:24:48 +03:00
Buffer: not copyable, add destructor
This commit is contained in:
parent
12d933d896
commit
bace526fa3
@ -29,6 +29,12 @@ Buffer::Buffer(const std::string& name, Type type,
|
||||
compute_lines();
|
||||
}
|
||||
|
||||
Buffer::~Buffer()
|
||||
{
|
||||
m_windows.clear();
|
||||
assert(m_modification_listeners.empty());
|
||||
}
|
||||
|
||||
void Buffer::erase(const BufferIterator& begin, const BufferIterator& end)
|
||||
{
|
||||
append_modification(BufferModification(BufferModification::Erase,
|
||||
|
@ -104,6 +104,10 @@ public:
|
||||
|
||||
Buffer(const std::string& name, Type type,
|
||||
const BufferString& initial_content = "");
|
||||
Buffer(const Buffer&) = delete;
|
||||
Buffer(Buffer&&) = delete;
|
||||
Buffer& operator= (const Buffer&) = delete;
|
||||
~Buffer();
|
||||
|
||||
void begin_undo_group();
|
||||
void end_undo_group();
|
||||
|
Loading…
Reference in New Issue
Block a user