From cd8c36fc500dc0df5fb4232a8b1b94ab89495737 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 27 Feb 2013 19:02:01 +0100 Subject: Add a debug option to Makefile, and use KAK_DEBUG define to remove debug code --- src/buffer.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/buffer.cc') diff --git a/src/buffer.cc b/src/buffer.cc index 3c919c19..a73f8fd3 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -225,6 +225,7 @@ bool Buffer::redo() void Buffer::check_invariant() const { +#ifdef KAK_DEBUG ByteCount start = 0; assert(not m_lines.empty()); for (auto& line : m_lines) @@ -234,6 +235,7 @@ void Buffer::check_invariant() const assert(line.content.back() == '\n'); start += line.length(); } +#endif } void Buffer::do_insert(const BufferIterator& pos, const String& content) -- cgit v1.2.3