From 0d202d3cfae8c75e0253e0bb529bcbaf01b70114 Mon Sep 17 00:00:00 2001
From: Martin Beseda <martinbeseda@seznam.cz>
Date: Mon, 17 Sep 2018 11:35:33 +0200
Subject: [PATCH] ENH: Simplified the message macros and removed DEBUG constant
 from compilation, as it's not neccessary now.

---
 CMakeLists.txt      |  1 -
 src/ISerializable.h |  8 ++++++++
 src/message.h       | 13 ++-----------
 3 files changed, 10 insertions(+), 12 deletions(-)
 create mode 100644 src/ISerializable.h

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 295817c5..2465df77 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,7 +23,6 @@ if (NOT CMAKE_BUILD_TYPE)
          FORCE)
 elseif("CMAKE_BUILD_TYPE" STREQUAL "Debug")
     #TODO rewrite to use add_compile_definitions
-    add_compile_options(-DDEBUG)
 endif (NOT CMAKE_BUILD_TYPE)
 
 #------------------------#
diff --git a/src/ISerializable.h b/src/ISerializable.h
new file mode 100644
index 00000000..5105cb85
--- /dev/null
+++ b/src/ISerializable.h
@@ -0,0 +1,8 @@
+//
+// Created by martin on 9/14/18.
+//
+
+#ifndef PROJECT_ISERIALIZABLE_H
+#define PROJECT_ISERIALIZABLE_H
+
+#endif //PROJECT_ISERIALIZABLE_H
diff --git a/src/message.h b/src/message.h
index 75f8098a..95703761 100644
--- a/src/message.h
+++ b/src/message.h
@@ -5,16 +5,7 @@
 #ifndef PROJECT_MESSAGE_H
 #define PROJECT_MESSAGE_H
 
-#define MSG_INFO(str)  {\
-    std::cout << "INFO: " << str << std::endl;\
-}
-
-#ifdef DEBUG
-#define MSG_DEBUG(str) {\
-    std::cout << "DEBUG: " << str << std::endl;\
-}
-#else
-#define MSG_DEBUG(str)
-#endif
+#define MSG_INFO(str) std::cout << "INFO: " << str << std::endl;
+#define MSG_DEBUG(str) assert(std::cerr << "DEBUG:" << str << std::endl);
 
 #endif //PROJECT_MESSAGE_H
-- 
GitLab