summaryrefslogtreecommitdiffhomepage
path: root/debug.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2025-01-04 11:28:20 +0100
committerRoland Reichwein <mail@reichwein.it>2025-01-04 11:28:20 +0100
commitb2c35cdf69a9084806ac7930cf4475980d596cf6 (patch)
treeb74b8f2ee2c66c59f7385407cfc34c2a0a16961f /debug.h
parentaaafcea7e26791acbf5b9612e3fb396edcdfcc8f (diff)
Separate out implementation from headers
Diffstat (limited to 'debug.h')
-rw-r--r--debug.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/debug.h b/debug.h
index 1965de0..335cd6e 100644
--- a/debug.h
+++ b/debug.h
@@ -6,17 +6,11 @@
class debug_ostream
{
public:
- debug_ostream(): m_active(false) {}
+ debug_ostream();
- void activate()
- {
- m_active = true;
- }
+ void activate();
- void deactivate()
- {
- m_active = false;
- }
+ void deactivate();
template<typename T>
debug_ostream& operator<<(const T& arg) {
@@ -27,11 +21,7 @@ public:
debug_ostream& operator<<(
std::basic_ostream<char>& (*func)
- (std::basic_ostream<char>&) ) {
- if (m_active)
- std::cout << *func;
- return *this;
- }
+ (std::basic_ostream<char>&) );
private:
bool m_active;