From 967abc2cc985da59daee3471f6d869add7ec89b3 Mon Sep 17 00:00:00 2001 From: Stefan Pranger Date: Tue, 29 Jun 2021 13:38:31 +0200 Subject: [PATCH] refactored debug to make it cleaner --- io/debug.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/io/debug.h b/io/debug.h index 358e8d7..e911791 100644 --- a/io/debug.h +++ b/io/debug.h @@ -4,13 +4,13 @@ #include struct print { - print() { if(false) std::cout.setstate(std::ios_base::failbit); } - ~print() { if(false) { std::cout.clear(); } else { std::cout << std::endl << std::flush; } } + print() {} + ~print() { std::cout << std::endl << std::flush; } }; struct noprint { - noprint() { if(true) std::cout.setstate(std::ios_base::failbit); } - ~noprint() { if(true) { std::cout.clear(); } else { std::cout << std::endl << std::flush; } } + noprint() { std::cout.setstate(std::ios_base::failbit); } + ~noprint() { std::cout.clear(); } };