Browse Source

refactored debug to make it cleaner

main
Stefan Pranger 3 years ago
parent
commit
967abc2cc9
  1. 8
      io/debug.h

8
io/debug.h

@ -4,13 +4,13 @@
#include <string> #include <string>
struct print { 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 { 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(); }
}; };

Loading…
Cancel
Save