Skip to content

Commit f6a70cd

Browse files
committed
Additional clang-tidy suggestions
This is a big commit! Lots of variable renaming, header removal and clang-format changes now it aligns the equal signs on copy/move assigments correctly.
1 parent fd377c1 commit f6a70cd

30 files changed

+192
-182
lines changed

include/inch/chart.hpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515

1616
#include <fmt/chrono.h>
1717
#include <fmt/format.h>
18+
#include <fmt/std.h>
1819

19-
#include <cmath>
20-
#include <iostream>
2120
#include <string>
2221
#include <vector>
2322

@@ -33,7 +32,7 @@ class Chart
3332
Chart(const Chart& Chart) = default;
3433
Chart(Chart&& Chart) noexcept = default;
3534

36-
Chart& operator=(const Chart& Chart) = delete;
35+
Chart& operator=(const Chart& Chart) = delete;
3736
Chart& operator=(Chart&& Chart) noexcept = delete;
3837

3938
virtual ~Chart() noexcept = default;
@@ -159,8 +158,7 @@ class Chart
159158
*/
160159
[[nodiscard]] static inline std::string getTime()
161160
{
162-
const std::time_t t = std::time(nullptr);
163-
return fmt::format("{:%Y-%m-%dT%H:%M:%S}", *std::localtime(&t));
161+
return fmt::format("{:%Y-%m-%dT%H:%M:%S}", fmt::localtime(std::time(nullptr)));
164162
}
165163

166164
/**
@@ -200,6 +198,7 @@ class Chart
200198
* \return The height the canvas should be
201199
*/
202200
[[nodiscard]] inline double
201+
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
203202
calculateCanvasHeight(const double key_scale, const double key_height, const int ZRange) const
204203
{
205204
double chart_height = ZRange + 2 * BORDER;

include/inch/dripline.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ class DripLine
100100
/// Container to hold each isotope in the drop model data file
101101
struct drop_model_data
102102
{
103+
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
103104
drop_model_data(const int mass_number, const int proton_number, const double mass_excess) :
104105
A(mass_number), Z(proton_number), N(mass_number - proton_number), ME(mass_excess)
105106
{

include/inch/eps_chart.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class EPSChart : public Chart
2626
EPSChart(const EPSChart& EPSChart) = default;
2727
EPSChart(EPSChart&& EPSChart) noexcept = default;
2828

29-
EPSChart& operator=(const EPSChart& EPSChart) = delete;
29+
EPSChart& operator=(const EPSChart& EPSChart) = delete;
3030
EPSChart& operator=(EPSChart&& EPSChart) noexcept = delete;
3131

3232
~EPSChart() noexcept override = default;

include/inch/eps_dripline.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@
1818

1919
#include <fmt/format.h>
2020

21-
#include <filesystem>
22-
#include <fstream>
2321
#include <string>
2422
#include <utility>
25-
#include <vector>
2623

2724

2825
class EPSDripLine : public DripLine
@@ -38,7 +35,7 @@ class EPSDripLine : public DripLine
3835

3936
/// Delete both due to const members
4037
EPSDripLine& operator=(const EPSDripLine&) = delete;
41-
EPSDripLine& operator=(EPSDripLine&&) = delete;
38+
EPSDripLine& operator=(EPSDripLine&&) = delete;
4239

4340
~EPSDripLine() override = default;
4441

include/inch/eps_grid.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class EPSGrid : public Grid
2424
EPSGrid(const EPSGrid& EPSGrid) = default;
2525
EPSGrid(EPSGrid&& EPSGrid) noexcept = default;
2626

27-
EPSGrid& operator=(const EPSGrid& EPSGrid) = default;
27+
EPSGrid& operator=(const EPSGrid& EPSGrid) = default;
2828
EPSGrid& operator=(EPSGrid&& EPSGrid) noexcept = default;
2929

3030
~EPSGrid() noexcept override = default;

include/inch/eps_key.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
#include <fstream>
1818
#include <string>
19-
#include <utility>
20-
#include <vector>
2119

2220

2321
class Options;
@@ -30,7 +28,7 @@ class EPSKey : public Key
3028
EPSKey(const EPSKey& EPSKey) = default;
3129
EPSKey(EPSKey&& EPSKey) = default;
3230

33-
EPSKey& operator=(const EPSKey& EPSKey) = default;
31+
EPSKey& operator=(const EPSKey& EPSKey) = default;
3432
EPSKey& operator=(EPSKey&& EPSKey) noexcept = default;
3533

3634
~EPSKey() noexcept override = default;

include/inch/eps_rProcess.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
#include "inch/limits.hpp"
1111
#include "inch/rProcess.hpp"
1212

13-
#include <filesystem>
1413
#include <string>
1514
#include <utility>
16-
#include <vector>
1715

1816
class EPSrProcess : public rProcess
1917
{
@@ -24,7 +22,7 @@ class EPSrProcess : public rProcess
2422
EPSrProcess(EPSrProcess&&) = default;
2523

2624
EPSrProcess& operator=(const EPSrProcess&) = delete;
27-
EPSrProcess& operator=(EPSrProcess&&) = delete;
25+
EPSrProcess& operator=(EPSrProcess&&) = delete;
2826

2927
~EPSrProcess() override = default;
3028

include/inch/grid.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Grid
2121
Grid(const Grid& Grid) = default;
2222
Grid(Grid&& Grid) noexcept = default;
2323

24-
Grid& operator=(const Grid& Grid) = default;
24+
Grid& operator=(const Grid& Grid) = default;
2525
Grid& operator=(Grid&& Grid) noexcept = default;
2626

2727
virtual ~Grid() noexcept = default;

include/inch/io.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class IO
2626
IO(IO&&) = default;
2727

2828
IO& operator=(const IO&) = default;
29-
IO& operator=(IO&&) = default;
29+
IO& operator=(IO&&) = default;
3030

3131
~IO() = default;
3232

include/inch/key.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Key
2929
Key(const Key& Key) = default;
3030
Key(Key&& Key) = default;
3131

32-
Key& operator=(const Key& Key) = default;
32+
Key& operator=(const Key& Key) = default;
3333
Key& operator=(Key&& Key) noexcept = default;
3434

3535
virtual ~Key() noexcept = default;

0 commit comments

Comments
 (0)