From e5121fe40a15bf3ae83245d30e9c096dbc745f77 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 16 Feb 2015 22:27:40 +0000 Subject: [PATCH] Wrap debug loop in ifdef KAK_DEBUG --- src/buffer.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/buffer.cc b/src/buffer.cc index 8706188e..51b54fde 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -30,10 +30,11 @@ Buffer::Buffer(String name, Flags flags, BufferLines lines, if (lines.empty()) lines.emplace_back(StringStorage::create("\n")); + #ifdef KAK_DEBUG for (auto& line : lines) - { - kak_assert(not (line->length == 0) and line->data()[line->length-1] == '\n'); - } + kak_assert(not (line->length == 0) and + line->data()[line->length-1] == '\n'); + #endif static_cast(m_lines) = std::move(lines); m_changes.push_back({ Change::Insert, true, {0,0}, line_count() });