Skip to content

Commit

Permalink
fix: Make BinUtility constructor explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgessinger committed Dec 5, 2024
1 parent 7efad56 commit e22bee0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Core/include/Acts/Utilities/BinUtility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class BinUtility {
///
/// @param bData is the provided binning data
/// @param tForm is the (optional) transform
BinUtility(const BinningData& bData,
const Transform3& tForm = Transform3::Identity())
explicit BinUtility(const BinningData& bData,
const Transform3& tForm = Transform3::Identity())
: m_binningData(), m_transform(tForm), m_itransform(tForm.inverse()) {
m_binningData.reserve(3);
m_binningData.push_back(bData);
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Json/src/MaterialJsonConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ nlohmann::json Acts::MaterialJsonConverter::toJsonDetray(
bUtility.binningData()[0u].binvalue == BinningValue::binZ &&
bUtility.binningData()[1u].binvalue == BinningValue::binPhi) {
BinUtility nbUtility(bUtility.binningData()[1u]);
nbUtility += bUtility.binningData()[0u];
nbUtility += BinUtility{bUtility.binningData()[0u]};
bUtility = std::move(nbUtility);
swapped = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <boost/test/unit_test.hpp>

#include "Acts/Utilities/BinUtility.hpp"
#include "Acts/Utilities/BinningData.hpp"
#include "ActsExamples/Digitization/ModuleClusters.hpp"
#include "ActsFatras/Digitization/Segmentizer.hpp"
Expand Down Expand Up @@ -46,10 +47,10 @@ DigitizedParameters makeDigitizationParameters(const Vector2 &position,
auto testDigitizedParametersWithTwoClusters(bool merge, const Vector2 &firstHit,
const Vector2 &secondHit) {
BinUtility binUtility;
binUtility +=
BinningData(BinningOption::open, BinningValue::binX, 20, -10.0f, 10.0f);
binUtility +=
BinningData(BinningOption::open, BinningValue::binY, 20, -10.0f, 10.0f);
binUtility += BinUtility{
BinningData(BinningOption::open, BinningValue::binX, 20, -10.0f, 10.0f)};
binUtility += BinUtility{
BinningData(BinningOption::open, BinningValue::binY, 20, -10.0f, 10.0f)};
std::vector<Acts::BoundIndices> boundIndices = {eBoundLoc0, eBoundLoc1};
double nsigma = 1;
bool commonCorner = true;
Expand Down

0 comments on commit e22bee0

Please sign in to comment.