diff --git a/Base/Axis/Coordinate.cpp b/Base/Axis/Coordinate.cpp index 945c61099b8764889f13ada44b2da0a408128bc2..33f73c14991b80f8eeb40e02e33e676588f9d197 100644 --- a/Base/Axis/Coordinate.cpp +++ b/Base/Axis/Coordinate.cpp @@ -38,9 +38,9 @@ std::pair<std::string, std::string> parse_label(const std::string& label) } // namespace -Coordinate::Coordinate(std::string name, std::string unit) - : m_name(std::move(name)) - , m_unit(std::move(unit)) +Coordinate::Coordinate(const std::string& name, const std::string& unit) + : m_name(name) + , m_unit(unit) { } diff --git a/Base/Axis/Coordinate.h b/Base/Axis/Coordinate.h index f569dc5693b3086023ef5ffc31e9c3d3c0f18063..3bd802836de6001acca29ad4d84678af9a7c4869 100644 --- a/Base/Axis/Coordinate.h +++ b/Base/Axis/Coordinate.h @@ -26,7 +26,7 @@ public: { } Coordinate(const std::string& label); - Coordinate(std::string name, std::string unit); + Coordinate(const std::string& name, const std::string& unit); bool operator==(const Coordinate& other) const = default; diff --git a/Base/Axis/Scale.cpp b/Base/Axis/Scale.cpp index 5aee9bd7703ddaaf2fde13eba0c8a0fc3b16ecd8..e64ad5525251437c35b4e595fe09a0289c264e67 100644 --- a/Base/Axis/Scale.cpp +++ b/Base/Axis/Scale.cpp @@ -24,8 +24,8 @@ using std::numbers::pi; -Scale::Scale(const Coordinate& coord, std::vector<Bin1D> bins) - : m_bins(std::move(bins)) +Scale::Scale(const Coordinate& coord, const std::vector<Bin1D>& bins) + : m_bins(bins) , m_coord(std::make_unique<Coordinate>(coord)) { if (size() == 0) diff --git a/Base/Axis/Scale.h b/Base/Axis/Scale.h index 2516940455aab15479cc5372a3f7ca295968851d..d6c3a00eab64e363b6a6ec845e27cc2ff6c10085 100644 --- a/Base/Axis/Scale.h +++ b/Base/Axis/Scale.h @@ -29,7 +29,7 @@ using trafo_t = std::function<double(double)>; class Scale { public: - Scale(const Coordinate& coord, std::vector<Bin1D> bins); + Scale(const Coordinate& coord, const std::vector<Bin1D>& bins); Scale(const Scale& other); Scale* clone() const;