summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/database/database.cpp2
-rw-r--r--src/utilities/utilities.hpp9
2 files changed, 7 insertions, 4 deletions
diff --git a/src/database/database.cpp b/src/database/database.cpp
index 9a2d5c06..4187ffe3 100644
--- a/src/database/database.cpp
+++ b/src/database/database.cpp
@@ -86,7 +86,7 @@ Database::Database(const Device &device, const std::string &kernel_name,
log_debug("Device name '" + device_name + "'; architecture '" + device_architecture + "'");
// Sets the databases to search through
- const auto databases = std::list<std::vector<database::DatabaseEntry>>{overlay, database};
+ auto databases = std::list<std::vector<database::DatabaseEntry>>{overlay, database};
// Special case: modifies the database if the device is a CPU with Apple OpenCL
#if defined(__APPLE__) || defined(__MACOSX)
diff --git a/src/utilities/utilities.hpp b/src/utilities/utilities.hpp
index 1ba3ab03..e45c606c 100644
--- a/src/utilities/utilities.hpp
+++ b/src/utilities/utilities.hpp
@@ -123,11 +123,14 @@ constexpr auto kBufScalar = "Scalar";
// =================================================================================================
+#ifdef VERBOSE
inline void log_debug(const std::string &log_string) {
- #ifdef VERBOSE
- printf("[DEBUG] %s\n", log_string.c_str());
- #endif
+ printf("[DEBUG] %s\n", log_string.c_str());
}
+#else
+inline void log_debug(const std::string&) { }
+#endif
+
// =================================================================================================