Skip to content

Commit

Permalink
Initialize module from another module (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
alxbilger authored Jan 27, 2024
1 parent 7aa1f09 commit 4ef05c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/SoftRobots/component/initSoftRobots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ extern "C" {
SOFA_SOFTROBOTS_API const char* getModuleComponentList();
}

void initExternalModule()
void init()
{
static bool first = true;
if (!first)
Expand All @@ -63,6 +63,11 @@ void initExternalModule()
}
}

void initExternalModule()
{
init();
}

const char* getModuleName()
{
return MODULE_NAME;
Expand Down
1 change: 1 addition & 0 deletions src/SoftRobots/component/initSoftRobots.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@

namespace softrobots
{
SOFA_SOFTROBOTS_API void init();
constexpr const char* MODULE_NAME = "@PROJECT_NAME@";
constexpr const char* MODULE_VERSION = "@PROJECT_VERSION@";
}
Expand Down

0 comments on commit 4ef05c2

Please sign in to comment.