From 9ffefc1f9cb1a19de18fe2acaa9bbe6be3aa8ebe Mon Sep 17 00:00:00 2001 From: kchristin Date: Sun, 27 Oct 2024 19:24:04 +0200 Subject: [PATCH] Improve set function of numRevIterations --- include/clad/Differentiator/ReverseModeVisitor.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/clad/Differentiator/ReverseModeVisitor.h b/include/clad/Differentiator/ReverseModeVisitor.h index 7a291e95a..79fd1c65f 100644 --- a/include/clad/Differentiator/ReverseModeVisitor.h +++ b/include/clad/Differentiator/ReverseModeVisitor.h @@ -519,7 +519,7 @@ namespace clad { clang::Expr *m_Pop = nullptr; clang::Expr *m_Push = nullptr; ReverseModeVisitor& m_RMV; - clang::VarDecl* numRevIterations = nullptr; + clang::VarDecl* m_numRevIterations = nullptr; public: LoopCounter(ReverseModeVisitor& RMV); @@ -554,12 +554,12 @@ namespace clad { } /// Sets the number of reverse iterations to be executed. - clang::VarDecl* setNumRevIterations(clang::VarDecl* numRevIterations) { - return this->numRevIterations = numRevIterations; + void setNumRevIterations(clang::VarDecl* numRevIterations) { + m_numRevIterations = numRevIterations; } /// Returns the number of reverse iterations to be executed. - clang::VarDecl* getNumRevIterations() const { return numRevIterations; } + clang::VarDecl* getNumRevIterations() const { return m_numRevIterations; } }; /// Helper function to differentiate a loop body.