From b6284cdb15cee65f4c4074de1c23608cbda2032ca6dd195fd09fa278183f11f7 Mon Sep 17 00:00:00 2001 From: gzip4 Date: Sat, 22 Feb 2025 12:54:29 +0500 Subject: [PATCH] Rename namespace, replace debug macros with functions --- include/fbsqlxx.hpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/include/fbsqlxx.hpp b/include/fbsqlxx.hpp index 3acdc63..b5c946e 100644 --- a/include/fbsqlxx.hpp +++ b/include/fbsqlxx.hpp @@ -17,8 +17,9 @@ #endif // !FBSQLXX_EXCEPTION_BUFFER_SIZE -namespace fbsqlxx2 { +namespace fbsqlxx { +std::string type_name(unsigned int type); #ifdef FBSQLXX_DEBUG template @@ -30,7 +31,6 @@ inline void debug(const char* s) { std::cout << s << std::endl; } -std::string type_name(unsigned int type); inline void print_metadata(Firebird::IMessageMetadata* md, Firebird::ThrowStatusWrapper* status) { auto count = md->getCount(status); @@ -57,8 +57,12 @@ inline void print_metadata(Firebird::IMessageMetadata* md, Firebird::ThrowStatus } } #else -#define debug(...) -#define print_metadata(...) +inline void debug(...) +{ +} +inline void print_metadata(...) +{ +} #endif // FBSQLXX_DEBUG @@ -1614,8 +1618,6 @@ inline connection connect(const char* database, const char* user, const char* pa } -} // namespace fbsqlxx2 +} // namespace fbsqlxx -#undef debug -#undef print_metadata #undef CATCH_SQL