Module: check_mk
Branch: master
Commit: 9f936f37861077cd8ecf4c393fb663dfad30e29e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9f936f37861077…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Dec 8 15:05:33 2017 +0100
Automatic clang-tidy fix for performance-unnecessary-value-param.
Change-Id: Ic5c06990ed4c257ef380cd020335738634a495d0
---
.clang-tidy | 3 +--
livestatus/src/CustomVarsDictColumn.h | 5 +++--
livestatus/src/DoubleAggregator.h | 3 ++-
livestatus/src/IntAggregator.h | 2 +-
livestatus/src/Renderer.h | 5 +++--
livestatus/src/TimeAggregator.h | 2 +-
6 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/.clang-tidy b/.clang-tidy
index ef8ae85..44a6a7d 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -35,9 +35,8 @@
# * cppcoreguidelines-special-member-functions
# * hicpp-special-member-functions
# * modernize-use-default-member-init
-# * performance-unnecessary-value-param
#
-Checks:
'*,-android-cloexec-fopen,-android-cloexec-open,-cert-env33-c,-cert-err34-c,-cert-err58-cpp,-clang-analyzer-alpha*,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-member-init,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-pro-type-vararg,-google-runtime-int,-google-runtime-references,-hicpp-member-init,-hicpp-no-assembler,-llvm-header-guard,-llvm-include-order,-modernize-use-bool-literals,-clang-analyzer-optin.performance.Padding,-cppcoreguidelines-special-member-functions,-hicpp-special-member-functions,-modernize-use-default-member-init,-performance-unnecessary-value-param'
+Checks:
'*,-android-cloexec-fopen,-android-cloexec-open,-cert-env33-c,-cert-err34-c,-cert-err58-cpp,-clang-analyzer-alpha*,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-member-init,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-pro-type-vararg,-google-runtime-int,-google-runtime-references,-hicpp-member-init,-hicpp-no-assembler,-llvm-header-guard,-llvm-include-order,-modernize-use-bool-literals,-clang-analyzer-optin.performance.Padding,-cppcoreguidelines-special-member-functions,-hicpp-special-member-functions,-modernize-use-default-member-init'
CheckOptions:
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '1'
diff --git a/livestatus/src/CustomVarsDictColumn.h
b/livestatus/src/CustomVarsDictColumn.h
index 1807387..fb0e529 100644
--- a/livestatus/src/CustomVarsDictColumn.h
+++ b/livestatus/src/CustomVarsDictColumn.h
@@ -30,6 +30,7 @@
#include <memory>
#include <string>
#include <unordered_map>
+#include <utility>
#include "Column.h"
#include "contact_fwd.h"
#include "opids.h"
@@ -43,8 +44,8 @@ public:
CustomVarsDictColumn(std::string name, std::string description,
int indirect_offset, int extra_offset,
int extra_extra_offset, int offset)
- : Column(name, description, indirect_offset, extra_offset,
- extra_extra_offset, offset) {}
+ : Column(std::move(name), std::move(description), indirect_offset,
+ extra_offset, extra_extra_offset, offset) {}
ColumnType type() const override { return ColumnType::dict; };
diff --git a/livestatus/src/DoubleAggregator.h b/livestatus/src/DoubleAggregator.h
index fd8b106..45649e7 100644
--- a/livestatus/src/DoubleAggregator.h
+++ b/livestatus/src/DoubleAggregator.h
@@ -35,7 +35,8 @@ class RowRenderer;
class DoubleAggregator : public Aggregator {
public:
- DoubleAggregator(AggregationFactory factory, const DoubleColumn *column)
+ DoubleAggregator(const AggregationFactory &factory,
+ const DoubleColumn *column)
: _aggregation(factory()), _column(column) {}
void consume(Row row, const contact * /*contact*/,
diff --git a/livestatus/src/IntAggregator.h b/livestatus/src/IntAggregator.h
index 33b9038..d162f28 100644
--- a/livestatus/src/IntAggregator.h
+++ b/livestatus/src/IntAggregator.h
@@ -35,7 +35,7 @@ class RowRenderer;
class IntAggregator : public Aggregator {
public:
- IntAggregator(AggregationFactory factory, const IntColumn *column)
+ IntAggregator(const AggregationFactory &factory, const IntColumn *column)
: _aggregation(factory()), _column(column) {}
void consume(Row row, const contact *auth_user,
diff --git a/livestatus/src/Renderer.h b/livestatus/src/Renderer.h
index 8f312d6..624e1d7 100644
--- a/livestatus/src/Renderer.h
+++ b/livestatus/src/Renderer.h
@@ -30,6 +30,7 @@
#include <iosfwd>
#include <memory>
#include <string>
+#include <utility>
#include <vector>
#include "data_encoding.h"
class CSVSeparators;
@@ -202,7 +203,7 @@ public:
void output(RowFragment value) {
separate();
- renderer().output(value);
+ renderer().output(std::move(value));
}
template <typename T>
@@ -324,7 +325,7 @@ public:
Renderer &renderer() const { return _row.renderer(); }
- void output(std::string key, std::string value) {
+ void output(const std::string &key, const std::string &value) {
BeginEnd be(*this);
renderer().output(key);
renderer().separateDictKeyValue();
diff --git a/livestatus/src/TimeAggregator.h b/livestatus/src/TimeAggregator.h
index 8fe615f..d1d2d90 100644
--- a/livestatus/src/TimeAggregator.h
+++ b/livestatus/src/TimeAggregator.h
@@ -35,7 +35,7 @@ class RowRenderer;
class TimeAggregator : public Aggregator {
public:
- TimeAggregator(AggregationFactory factory, const TimeColumn *column)
+ TimeAggregator(const AggregationFactory &factory, const TimeColumn *column)
: _aggregation(factory()), _column(column) {}
void consume(Row row, const contact * /*auth_user*/,