From 514cb20064a39b938487b4d0377620aac19e1c0d Mon Sep 17 00:00:00 2001 From: Cory Date: Sun, 17 Sep 2023 16:21:46 +0200 Subject: [PATCH] Create debug function that abuses preprocessor --- include/utils.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/utils.hpp b/include/utils.hpp index e69de29..4dbbb1a 100644 --- a/include/utils.hpp +++ b/include/utils.hpp @@ -0,0 +1,10 @@ +#ifndef __UTILS__ +#define __UTILS__ + +#ifdef DBG + #define DEBUG(msg) std::cout << __FILE__ << " " << __LINE__ << ": " << msg << std::endl +#else + #define DEBUG(msg) +#endif + +#endif