Skip to content

Commit

Permalink
set warnings only if dev mode is enabled (SOFA_WITH_DEVTOOLS enabled)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredroy committed Dec 12, 2024
1 parent c99ace1 commit a09d4d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Sofa/framework/Core/src/sofa/core/ObjectFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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());
}
Expand Down

0 comments on commit a09d4d3

Please sign in to comment.