Skip to content

Commit

Permalink
Enforce shared BField to be const
Browse files Browse the repository at this point in the history
  • Loading branch information
asalzburger committed Oct 20, 2017
1 parent d349cde commit 0f30822
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Core/include/ACTS/MagneticField/SharedBFieldMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ class SharedBField
{
public:
/// @brief the constructur with a shared pointer
/// @note since it is a shared field, we enforce it to be const
/// @tparam bField is the shared BField to be stored
SharedBField(std::shared_ptr<BField> bField) : m_bField(bField) {}
SharedBField(std::shared_ptr<const BField> bField) : m_bField(bField) {}

/// @brief retrieve magnetic field value
///
Expand Down Expand Up @@ -67,7 +68,7 @@ class SharedBField
}

private:
std::shared_ptr<BField> m_bField;
std::shared_ptr<const BField> m_bField;
};

} // namespace Acts
Expand Down

0 comments on commit 0f30822

Please sign in to comment.