diff --git a/include/clad/Differentiator/ReverseModeVisitor.h b/include/clad/Differentiator/ReverseModeVisitor.h index 4b8d22837..dd8b9e014 100644 --- a/include/clad/Differentiator/ReverseModeVisitor.h +++ b/include/clad/Differentiator/ReverseModeVisitor.h @@ -518,7 +518,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); @@ -553,12 +553,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.