Skip to content

Commit a09d4d3

Browse files
committed
set warnings only if dev mode is enabled (SOFA_WITH_DEVTOOLS enabled)
1 parent c99ace1 commit a09d4d3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Sofa/framework/Core/src/sofa/core/ObjectFactory.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,8 @@ bool ObjectFactory::registerObjectsFromPlugin(const std::string& pluginName)
775775
// do not register if it was already done before
776776
if(m_registeredPluginSet.count(pluginName) > 0)
777777
{
778-
msg_warning("ObjectFactory") << pluginName << " has already registered its components.";
778+
// This warning should be generalized (i.e not only in dev mode) when runSofa will not auto-load modules/plugins by default anymore
779+
dmsg_warning("ObjectFactory") << pluginName << " has already registered its components.";
779780
return false;
780781
}
781782

@@ -837,7 +838,7 @@ RegisterObject& RegisterObject::addCreator(std::string classname, std::string te
837838

838839
RegisterObject::operator int() const
839840
{
840-
msg_warning("RegisterObject") << m_objectRegistrationdata.entry.className
841+
dmsg_warning("RegisterObject") << m_objectRegistrationdata.entry.className
841842
<< ": Implicit object registration is deprecated since v24.12. Check #4429 for more information.";
842843
return commitTo(ObjectFactory::getInstance());
843844
}

0 commit comments

Comments
 (0)