Commit cbc1b06c authored by Håkan Wennlöf's avatar Håkan Wennlöf
Browse files

Linter made a good point, fixed it

It's silly to make compies of const variables, might as well send them along as const references.
parent e08e4650
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ std::shared_ptr<DetectorModel> DetectorModel::factory(const std::string& name, c

DetectorModel::DetectorModel(std::string type,
                             std::shared_ptr<DetectorAssembly> assembly,
                             const ConfigReader reader,
                             const ConfigReader& reader,
                             const Configuration& config)
    : type_(std::move(type)), assembly_(std::move(assembly)), reader_(std::move(reader)) {
    using namespace ROOT::Math;
@@ -170,7 +170,7 @@ void DetectorModel::addImplant(const Implant::Type& type,
                               ROOT::Math::XYZVector size,
                               const ROOT::Math::XYVector& offset,
                               double orientation,
                               const Configuration config) {
                               const Configuration& config) {
    // Calculate offset from sensor center - sign of the shift depends on whether it's on front- or backside:
    auto offset_z = (getSensorSize().z() - size.z()) / 2. * (type == Implant::Type::FRONTSIDE ? 1 : -1);
    ROOT::Math::XYZVector full_offset(offset.x(), offset.y(), offset_z);
+2 −2
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ namespace allpix {
         */
        explicit DetectorModel(std::string type,
                               std::shared_ptr<DetectorAssembly> assembly,
                               const ConfigReader reader,
                               const ConfigReader& reader,
                               const Configuration& config);

        /**
@@ -543,7 +543,7 @@ namespace allpix {
                        ROOT::Math::XYZVector size,
                        const ROOT::Math::XYVector& offset,
                        double orientation,
                        const Configuration config);
                        const Configuration& config);

        /**
         * @brief Add a new layer of support