Skip to content

Commit

Permalink
Merge pull request #65 from lsst/tickets/DM-42065
Browse files Browse the repository at this point in the history
DM-42065: Move Object::getI into library body
  • Loading branch information
mwittgen committed Dec 9, 2023
2 parents 3273194 + cb62dcb commit 50ff169
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 1 addition & 5 deletions include/astshim/Object.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,7 @@ class Object {
@throws std::runtime_error if the attribute does not exist or the value cannot be converted
*/
int getI(std::string const &attrib) const {
int val = astGetI(getRawPtr(), attrib.c_str());
assertOK();
return val;
}
int getI(std::string const &attrib) const;

/**
Get the value of an attribute as a long int
Expand Down
6 changes: 6 additions & 0 deletions src/Object.cc
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@ Object::Object(AstObject *object) : _objPtr(object, &detail::annulAstObject) {
}
}

int Object::getI(std::string const &attrib) const {
int val = astGetI(getRawPtr(), attrib.c_str());
assertOK();
return val;
}

// Explicit instantiations
template std::shared_ptr<KeyMap> Object::fromAstObject<KeyMap>(AstObject *, bool);
template std::shared_ptr<FitsChan> Object::fromAstObject<FitsChan>(AstObject *, bool);
Expand Down

0 comments on commit 50ff169

Please sign in to comment.