From f2c9870fb15776c150b95cd037332d8251c4535b Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Tue, 23 Oct 2018 11:37:00 +0200 Subject: [PATCH 1/2] improve warning message - include library name - nicer formatting --- src/class_loader.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/class_loader.cpp b/src/class_loader.cpp index 50cf4e23..9c3aaae8 100644 --- a/src/class_loader.cpp +++ b/src/class_loader.cpp @@ -150,12 +150,11 @@ int ClassLoader::unloadLibraryInternal(bool lock_plugin_ref_count) try { if (plugin_ref_count_ > 0) { - CONSOLE_BRIDGE_logWarn( - "%s", - "class_loader.ClassLoader: SEVERE WARNING!!! " - "Attempting to unload library while objects created by this loader exist in the heap! " - "You should delete your objects before attempting to unload the library or destroying " - "the ClassLoader. The library will NOT be unloaded."); + CONSOLE_BRIDGE_logWarn("class_loader.ClassLoader: SEVERE WARNING!!!\n" + "Attempting to unload %s\n" + "while objects created by this library still exist in the heap!\n" + "You should delete your objects before destroying the ClassLoader. " + "The library will NOT be unloaded.", library_path_.c_str()); } else { load_ref_count_ = load_ref_count_ - 1; if (load_ref_count_ == 0) { From 7750a752a37f1caea60c2e8fcf27721abcc519ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Wed, 30 Jan 2019 15:09:28 -0800 Subject: [PATCH 2/2] linter --- src/class_loader.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/class_loader.cpp b/src/class_loader.cpp index 9c3aaae8..464d20c0 100644 --- a/src/class_loader.cpp +++ b/src/class_loader.cpp @@ -151,10 +151,10 @@ int ClassLoader::unloadLibraryInternal(bool lock_plugin_ref_count) try { if (plugin_ref_count_ > 0) { CONSOLE_BRIDGE_logWarn("class_loader.ClassLoader: SEVERE WARNING!!!\n" - "Attempting to unload %s\n" - "while objects created by this library still exist in the heap!\n" - "You should delete your objects before destroying the ClassLoader. " - "The library will NOT be unloaded.", library_path_.c_str()); + "Attempting to unload %s\n" + "while objects created by this library still exist in the heap!\n" + "You should delete your objects before destroying the ClassLoader. " + "The library will NOT be unloaded.", library_path_.c_str()); } else { load_ref_count_ = load_ref_count_ - 1; if (load_ref_count_ == 0) {