Skip to content

Commit

Permalink
replace CONST_PTR and PTR macros by std::shared
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Wittgen committed Jul 12, 2021
1 parent 7058be7 commit 237240d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions include/lsst/daf/persistence/LogicalLocation.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ class LogicalLocation {
typedef std::shared_ptr<LogicalLocation> Ptr;

LogicalLocation(std::string const& locString,
CONST_PTR(dafBase::PropertySet) additionalData = CONST_PTR(dafBase::PropertySet)());
std::shared_ptr<dafBase::PropertySet const> additionalData = std::shared_ptr<dafBase::PropertySet const >());
std::string const& locString(void) const;

static void setLocationMap(PTR(dafBase::PropertySet) map);
static void setLocationMap(std::shared_ptr<dafBase::PropertySet> map);

private:
std::string _locString; ///< The location string.
static PTR(dafBase::PropertySet) _map; ///< The logical-to-less-logical map.
static std::shared_ptr<dafBase::PropertySet> _map; ///< The logical-to-less-logical map.
};

} // namespace persistence
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/daf/persistence/logicalLocation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ PYBIND11_MODULE(logicalLocation, mod) {
py::class_<LogicalLocation> cls(mod, "LogicalLocation");

cls.def(py::init<std::string const&>());
cls.def(py::init<std::string const&, CONST_PTR(dafBase::PropertySet)>());
cls.def(py::init<std::string const&, std::shared_ptr<dafBase::PropertySet const>>());
cls.def("locString", &LogicalLocation::locString);
cls.def_static("setLocationMap", LogicalLocation::setLocationMap);
}
Expand Down
4 changes: 2 additions & 2 deletions src/LogicalLocation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ dafBase::PropertySet::Ptr dafPersist::LogicalLocation::_map;
/** Constructor from string and additional data.
*/
dafPersist::LogicalLocation::LogicalLocation(std::string const& locString,
CONST_PTR(dafBase::PropertySet) additionalData)
std::shared_ptr<dafBase::PropertySet const> additionalData)
: _locString() {
std::regex expr("(%.*?)\\((\\w+?)\\)");
std::sregex_iterator i = std::sregex_iterator(locString.begin(), locString.end(), expr);
Expand Down Expand Up @@ -122,7 +122,7 @@ std::string const& dafPersist::LogicalLocation::locString(void) const { return _

/** Set the logical-to-less-logical map.
*/
void dafPersist::LogicalLocation::setLocationMap(PTR(dafBase::PropertySet) map) {
void dafPersist::LogicalLocation::setLocationMap(std::shared_ptr<dafBase::PropertySet> map) {
if (map) {
_map = map->deepCopy();
} else {
Expand Down

0 comments on commit 237240d

Please sign in to comment.