Skip to content
Snippets Groups Projects
Commit d2899918 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

suggested by clang-tidy

parent 25c247f8
No related branches found
No related tags found
1 merge request!2184cleanup as suggested by clang-tidy
......@@ -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));
......
......@@ -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);
}
......
......@@ -17,7 +17,6 @@
#include <iomanip>
#include <iostream>
#include <sstream>
#include <stdexcept>
std::string Base::System::getCurrentDateAndTime()
{
......
......@@ -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;
......
......@@ -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;
......
......@@ -26,5 +26,3 @@ SpecularElement::SpecularElement(size_t i_out, bool computable, double weight, d
, m_k(k)
{
}
SpecularElement::~SpecularElement() = default;
......@@ -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; }
......
......@@ -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);
......
......@@ -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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment