diff --git a/src/runner/pythonutils.cpp b/src/runner/pythonutils.cpp index 8dcdd3d..088d1b6 100644 --- a/src/runner/pythonutils.cpp +++ b/src/runner/pythonutils.cpp @@ -7,12 +7,12 @@ #include "log.h" -// Contains the list of filename / line number for which a depreciation warning has already been shown. -static std::set> g_DeprecatedLines; - namespace utils { void show_depreciation_warning(std::string_view name, std::string_view message, bool show_once) { + + // Contains the list of filename / line number for which a depreciation warning has already been shown. + static std::set> DeprecatedLines; // Find the caller: auto inspect = bpy::import("inspect"); @@ -23,12 +23,12 @@ namespace utils { auto lineno = bpy::extract(callable_frame[-1].attr("lineno")); // Only show once if requested: - if (show_once && g_DeprecatedLines.contains({ filename, lineno })) { + if (show_once && DeprecatedLines.contains({ filename, lineno })) { return; } // Register the depreciation: - g_DeprecatedLines.emplace(filename, lineno); + DeprecatedLines.emplace(filename, lineno); auto path = relative(std::filesystem::path(filename), QCoreApplication::applicationDirPath().toStdWString()); diff --git a/src/runner/pythonutils.h b/src/runner/pythonutils.h index 40f4b6d..9d77594 100644 --- a/src/runner/pythonutils.h +++ b/src/runner/pythonutils.h @@ -200,7 +200,7 @@ namespace utils { /** * @brief Show a depreciation warning. - * + * * @param name Name of the deprecated function. * @param message Depreciation message. * @param show_once Only show the message once.