diff --git a/Base/Axis/Frame.cpp b/Base/Axis/Frame.cpp index 5e25bbb8b021fb456096adb7447b6d1ea0e3f15e..1998ab0e980bb13ebff8b9774378610b86b48644 100644 --- a/Base/Axis/Frame.cpp +++ b/Base/Axis/Frame.cpp @@ -137,7 +137,7 @@ Frame* Frame::plottableFrame() const { std::vector<const Scale*> outaxes; for (size_t k = 0; k < rank(); ++k) { - Scale* s = new Scale(axis(k).plottableScale()); + auto* s = new Scale(axis(k).plottableScale()); outaxes.emplace_back(s); } return new Frame(std::move(outaxes)); diff --git a/Base/Axis/Scale.cpp b/Base/Axis/Scale.cpp index fd248b0dc40c3556d423e553e0c27ec2ebd1b8ec..684df3788bb1c69f5578403115ec7d2067123d68 100644 --- a/Base/Axis/Scale.cpp +++ b/Base/Axis/Scale.cpp @@ -46,8 +46,8 @@ Scale::Scale(const Coordinate& coord, std::vector<Bin1D> bins) } Scale::Scale(const Scale& other) + : m_bins(other.m_bins) { - m_bins = other.m_bins; ASSERT(other.m_coord); m_coord = std::make_unique<Coordinate>(*other.m_coord); } diff --git a/Base/Util/SysUtil.cpp b/Base/Util/SysUtil.cpp index 9bfc3d361b032a0c1958dfeb4dc4506c2d831d95..6ac6c77c2ef0d8ac7ce82a8e15204b7937ad6c4a 100644 --- a/Base/Util/SysUtil.cpp +++ b/Base/Util/SysUtil.cpp @@ -17,7 +17,6 @@ #include <iomanip> #include <iostream> #include <sstream> -#include <stdexcept> std::string Base::System::getCurrentDateAndTime() { diff --git a/Resample/Element/DiffuseElement.cpp b/Resample/Element/DiffuseElement.cpp index 4b50e37779875995f365c0dbf6527ccd2e5ea4f8..e2c0e51e69f8ccf9a3bd4296f7d2cec8dc07e649 100644 --- a/Resample/Element/DiffuseElement.cpp +++ b/Resample/Element/DiffuseElement.cpp @@ -38,8 +38,6 @@ DiffuseElement::DiffuseElement(double wavelength, double alpha_i, double phi_i, { } -DiffuseElement::~DiffuseElement() = default; - void DiffuseElement::setFluxes(const Fluxes* fluxes_in, const Fluxes* fluxes_out) { m_fluxes_in = fluxes_in; diff --git a/Resample/Element/DiffuseElement.h b/Resample/Element/DiffuseElement.h index 193fe3d7ee6caaa685749d33b9e804a674cf90e1..e4017b6b71b07a5e670dfbd03d9bf71a9a2ffe80 100644 --- a/Resample/Element/DiffuseElement.h +++ b/Resample/Element/DiffuseElement.h @@ -37,7 +37,6 @@ public: const Fluxes* fluxes_in = nullptr, const Fluxes* fluxes_out = nullptr); DiffuseElement(const DiffuseElement&) = delete; DiffuseElement(DiffuseElement&&) noexcept = default; - ~DiffuseElement(); void setFluxes(const Fluxes* fluxes_in, const Fluxes* fluxes_out); const IFlux* fluxIn(size_t i_layer) const; diff --git a/Resample/Element/SpecularElement.cpp b/Resample/Element/SpecularElement.cpp index 58f3797a2af43ef311eadd7a7c103e79356fe1c3..113965527b2e1b417ef419a203a8bf143397ad15 100644 --- a/Resample/Element/SpecularElement.cpp +++ b/Resample/Element/SpecularElement.cpp @@ -26,5 +26,3 @@ SpecularElement::SpecularElement(size_t i_out, bool computable, double weight, d , m_k(k) { } - -SpecularElement::~SpecularElement() = default; diff --git a/Resample/Element/SpecularElement.h b/Resample/Element/SpecularElement.h index 9045358b08c1f29d1354fb0fdbeea109c27273fe..b2408bab69a2e8cd6f8602f92277487dc6745b13 100644 --- a/Resample/Element/SpecularElement.h +++ b/Resample/Element/SpecularElement.h @@ -38,8 +38,6 @@ public: SpecularElement(const SpecularElement& other) = delete; SpecularElement(SpecularElement&& other) noexcept = default; - ~SpecularElement(); - size_t i_out() const { return m_i_out; } double weight() const { return m_weight; } double beamIntensity() const { return m_beamIntensity; } diff --git a/Sample/Scattering/Rotations.h b/Sample/Scattering/Rotations.h index d5b4d6ee94d37c160da7be4dfb8ef696e0eb8608..d9aef6703885f6ed31acc9ec4f6c5d4e4b240fd4 100644 --- a/Sample/Scattering/Rotations.h +++ b/Sample/Scattering/Rotations.h @@ -24,7 +24,7 @@ class IRotation : public ICloneable, public INode { public: - static IRotation* createRotation(const RotMatrix& transform); + static IRotation* createRotation(const RotMatrix& matrix); IRotation(const std::vector<double>& PValues); diff --git a/Sample/Shapes/IShape3D.cpp b/Sample/Shapes/IShape3D.cpp index 17b221bfe2d9861049ef28b340b0c4156eec3ce1..dc6d18c44778baed3cfc41f3a090b4584b4b908d 100644 --- a/Sample/Shapes/IShape3D.cpp +++ b/Sample/Shapes/IShape3D.cpp @@ -69,9 +69,8 @@ std::vector<R3> EllipseVerticesXtrunc(double x, double r_y, double r_z, double z double y = r_y * std::cos(angle); double z = r_z * std::sin(angle) - z_b; // bottom is at 0, top at z_t-z_b - if (0 <= z && z <= (z_t - z_b)) { - result.push_back(R3(x, y, z)); - } + if (0 <= z && z <= (z_t - z_b)) + result.emplace_back(R3(x, y, z)); } double alpha_t = atan(z_t / sqrt(r_z * r_z - z_t * z_t) * r_z / r_y); double alpha_b = atan(z_b / sqrt(r_z * r_z - z_b * z_b) * r_z / r_y); @@ -79,10 +78,10 @@ std::vector<R3> EllipseVerticesXtrunc(double x, double r_y, double r_z, double z double y_t = r_y * std::cos(alpha_t); double y_b = r_y * std::cos(alpha_b); - result.push_back(R3(x, y_t, z_t - z_b)); - result.push_back(R3(x, -y_t, z_t - z_b)); - result.push_back(R3(x, y_b, 0)); - result.push_back(R3(x, -y_b, 0)); + result.emplace_back(R3(x, y_t, z_t - z_b)); + result.emplace_back(R3(x, -y_t, z_t - z_b)); + result.emplace_back(R3(x, y_b, 0)); + result.emplace_back(R3(x, -y_b, 0)); return result; }