Skip to content

Commit

Permalink
Make parameter 'configuration' a const reference
Browse files Browse the repository at this point in the history
- Clang-Tidy: The parameter 'configuration' is copied for each invocation but only used as a const reference;

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
  • Loading branch information
lauft committed Apr 10, 2019
1 parent 42cb727 commit ea9a5e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Chart.cpp
Expand Up @@ -37,7 +37,7 @@
#include <Chart.h> #include <Chart.h>


//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
Chart::Chart (ChartConfig configuration) : Chart::Chart (const ChartConfig& configuration) :
reference_datetime(configuration.reference_datetime), reference_datetime(configuration.reference_datetime),
with_label_month(configuration.with_label_month), with_label_month(configuration.with_label_month),
with_label_week(configuration.with_label_week), with_label_week(configuration.with_label_week),
Expand Down
2 changes: 1 addition & 1 deletion src/Chart.h
Expand Up @@ -35,7 +35,7 @@
class Chart class Chart
{ {
public: public:
explicit Chart (ChartConfig configuration); explicit Chart (const ChartConfig& configuration);


std::string render (const Interval&, const std::vector <Interval>&, const std::vector <Range>&, const std::map <Datetime, std::string>&); std::string render (const Interval&, const std::vector <Interval>&, const std::vector <Range>&, const std::map <Datetime, std::string>&);


Expand Down

0 comments on commit ea9a5e3

Please sign in to comment.