summaryrefslogtreecommitdiff
path: root/src/editor.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-02-27 19:02:01 +0100
committerMaxime Coste <frrrwww@gmail.com>2013-02-27 19:02:01 +0100
commitcd8c36fc500dc0df5fb4232a8b1b94ab89495737 (patch)
tree15a83f3eecbc3e55985a36f2083fb4a16ddbd41b /src/editor.cc
parent6f48407f55bf57b6cd1cd01f4e327c8137d592ac (diff)
Add a debug option to Makefile, and use KAK_DEBUG define to remove debug code
Diffstat (limited to 'src/editor.cc')
-rw-r--r--src/editor.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/editor.cc b/src/editor.cc
index 1567608e..77080312 100644
--- a/src/editor.cc
+++ b/src/editor.cc
@@ -376,6 +376,7 @@ bool Editor::redo()
void Editor::check_invariant() const
{
+#ifdef KAK_DEBUG
assert(not m_selections.empty());
m_selections.check_invariant();
@@ -383,6 +384,7 @@ void Editor::check_invariant() const
compare_selections);
assert(std::is_sorted(m_selections.begin(), it, compare_selections));
assert(std::is_sorted(it, m_selections.end(), compare_selections));
+#endif
}
void Editor::begin_edition()