Skip to content

Commit c6839fe

Browse files
committed
refactor userver: drop explicit operator!=
commit_hash:456a870478ab7b164a843296a363b21bb6ce8cfa
1 parent 9aa4588 commit c6839fe

46 files changed

Lines changed: 2 additions & 100 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

core/include/userver/dump/config.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ struct DynamicConfig final {
5050
explicit DynamicConfig(const Config& config, ConfigPatch&& patch);
5151

5252
bool operator==(const DynamicConfig& other) const noexcept;
53-
bool operator!=(const DynamicConfig& other) const noexcept;
5453

5554
bool dumps_enabled;
5655
std::chrono::milliseconds min_dump_interval;

core/include/userver/utils/periodic_task.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ class PeriodicTask final {
101101
{}
102102

103103
bool operator==(const Settings& other) const noexcept;
104-
bool operator!=(const Settings& other) const noexcept;
105104

106105
// Note: Tidy requires us to explicitly initialize these fields, although
107106
// the initializers are never used.

core/include/userver/utils/trx_tracker.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ class TaskId final {
5050
TaskId();
5151

5252
bool operator==(const TaskId& other) const;
53-
bool operator!=(const TaskId& other) const;
5453

5554
private:
5655
std::thread::id created_thread_id_;

core/src/cache/expirable_lru_cache_test.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ class Counter {
4949

5050
bool operator==(const Counter& other) const { return value_ == other.value_; }
5151

52-
bool operator!=(const Counter& other) const { return !(*this == other); }
53-
5452
Counter& operator++() {
5553
value_++;
5654
return *this;

core/src/dump/config.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ bool DynamicConfig::operator==(const DynamicConfig& other) const noexcept {
7474
return dumps_enabled == other.dumps_enabled && min_dump_interval == other.min_dump_interval;
7575
}
7676

77-
bool DynamicConfig::operator!=(const DynamicConfig& other) const noexcept { return !(*this == other); }
78-
7977
} // namespace dump
8078

8179
USERVER_NAMESPACE_END

core/src/utils/periodic_task.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ bool PeriodicTask::Settings::operator==(const Settings& other) const noexcept {
7272
return TieSettings(*this) == TieSettings(other);
7373
}
7474

75-
bool PeriodicTask::Settings::operator!=(const Settings& other) const noexcept {
76-
return TieSettings(*this) != TieSettings(other);
77-
}
78-
7975
PeriodicTask::PeriodicTask()
8076
: impl_()
8177
{}

core/src/utils/statistics/histogram_view.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,10 @@ double HistogramView::GetTotalSum() const noexcept {
6767
return total;
6868
}
6969

70-
void DumpMetric(Writer& writer, HistogramView histogram) { writer = histogram; }
71-
7270
bool operator==(HistogramView lhs, HistogramView rhs) noexcept {
7371
return impl::histogram::HasSameBoundsAndValues(lhs, rhs);
7472
}
7573

76-
bool operator!=(HistogramView lhs, HistogramView rhs) noexcept { return !(lhs == rhs); }
77-
7874
} // namespace utils::statistics
7975

8076
USERVER_NAMESPACE_END

core/src/utils/trx_tracker.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ bool TaskId::operator==(const TaskId& other) const {
102102
return created_thread_id_ == other.created_thread_id_ && thread_local_counter_ == other.thread_local_counter_;
103103
}
104104

105-
bool TaskId::operator!=(const TaskId& other) const { return !(*this == other); }
106-
107105
} // namespace impl
108106

109107
TransactionLock::~TransactionLock() { Unlock(); }

kafka/include/userver/kafka/headers.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ class HeadersIterator {
6565
reference operator*() const;
6666

6767
bool operator==(const HeadersIterator&) const;
68-
bool operator!=(const HeadersIterator&) const;
6968

7069
private:
7170
const rd_kafka_headers_s* headers_{nullptr};

kafka/src/kafka/headers.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ bool HeadersIterator::operator==(const HeadersIterator& other) const {
6868
return std::tie(headers_, index_) == std::tie(other.headers_, other.index_);
6969
}
7070

71-
bool HeadersIterator::operator!=(const HeadersIterator& other) const { return !(*this == other); }
72-
7371
HeadersReader::HeadersReader(const rd_kafka_headers_t* headers)
7472
: headers_{headers},
7573
size_{size()}

0 commit comments

Comments
 (0)