From a09d4d33885d9b22b8c8952d38e702da85a5cbaa Mon Sep 17 00:00:00 2001 From: Frederick Roy Date: Fri, 13 Dec 2024 08:23:52 +0900 Subject: [PATCH] set warnings only if dev mode is enabled (SOFA_WITH_DEVTOOLS enabled) --- Sofa/framework/Core/src/sofa/core/ObjectFactory.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sofa/framework/Core/src/sofa/core/ObjectFactory.cpp b/Sofa/framework/Core/src/sofa/core/ObjectFactory.cpp index 401e0cfc999..20402e7c25f 100644 --- a/Sofa/framework/Core/src/sofa/core/ObjectFactory.cpp +++ b/Sofa/framework/Core/src/sofa/core/ObjectFactory.cpp @@ -775,7 +775,8 @@ bool ObjectFactory::registerObjectsFromPlugin(const std::string& pluginName) // do not register if it was already done before if(m_registeredPluginSet.count(pluginName) > 0) { - msg_warning("ObjectFactory") << pluginName << " has already registered its components."; + // This warning should be generalized (i.e not only in dev mode) when runSofa will not auto-load modules/plugins by default anymore + dmsg_warning("ObjectFactory") << pluginName << " has already registered its components."; return false; } @@ -837,7 +838,7 @@ RegisterObject& RegisterObject::addCreator(std::string classname, std::string te RegisterObject::operator int() const { - msg_warning("RegisterObject") << m_objectRegistrationdata.entry.className + dmsg_warning("RegisterObject") << m_objectRegistrationdata.entry.className << ": Implicit object registration is deprecated since v24.12. Check #4429 for more information."; return commitTo(ObjectFactory::getInstance()); }