Skip to content

Commit

Permalink
Some minor cleaning up.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Oct 22, 2024
1 parent 228e25a commit 4e8b0a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/api/libcellml/generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,12 @@ class LIBCELLML_EXPORT Generator
* Return the equation code for the given @ref AnalyserEquationAst using @ref GeneratorProfile.
*
* @param ast The @ref AnalyserEquationAst for which we want to generate some code.
* @param generatorProfile The @ref GeneratorProfile, if any, to use to generate the equation code. If no
* @param profile The @ref GeneratorProfile, if any, to use to generate the equation code. If no
* @ref GeneratorProfile is provided then the default @ref GeneratorProfile is used.
*
* @return The equation code as a @c std::string.
*/
static std::string equationCode(const AnalyserEquationAstPtr &ast,
const GeneratorProfilePtr &generatorProfile);
static std::string equationCode(const AnalyserEquationAstPtr &ast, const GeneratorProfilePtr &profile);

/**
* @brief Get the equation code for the given @ref AnalyserEquationAst using a default @ref GeneratorProfile.
Expand Down
7 changes: 3 additions & 4 deletions src/generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2152,13 +2152,12 @@ std::string Generator::implementationCode() const
return mPimpl->mCode;
}

std::string Generator::equationCode(const AnalyserEquationAstPtr &ast,
const GeneratorProfilePtr &generatorProfile)
std::string Generator::equationCode(const AnalyserEquationAstPtr &ast, const GeneratorProfilePtr &profile)
{
GeneratorPtr generator = libcellml::Generator::create();

if (generatorProfile != nullptr) {
generator->setProfile(generatorProfile);
if (profile != nullptr) {
generator->setProfile(profile);
}

return generator->mPimpl->generateCode(ast);
Expand Down

0 comments on commit 4e8b0a2

Please sign in to comment.