Skip to content

Commit

Permalink
Add const version of PyAst::get_shared_ptr.
Browse files Browse the repository at this point in the history
Fixes NVHPC compiler warning: warning #612-D: overloaded virtual
function "nmodl::ast::Ast::get_shared_ptr" is only partially
overridden in class "PyAst".
  • Loading branch information
olupton committed Aug 23, 2021
1 parent ae97685 commit 021cd4e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/language/templates/pybind/pyast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ struct PyAst: public Ast {
PYBIND11_OVERLOAD(std::shared_ptr<Ast>, Ast, get_shared_ptr, );
}

std::shared_ptr<const Ast> get_shared_ptr() const override {
PYBIND11_OVERLOAD(std::shared_ptr<const Ast>, Ast, get_shared_ptr, );
}

const ModToken* get_token() const override {
PYBIND11_OVERLOAD(const ModToken*, Ast, get_token, );
}
Expand Down

0 comments on commit 021cd4e

Please sign in to comment.