aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortobo <tobo@yandex-team.ru>2022-02-28 12:04:09 +0300
committertobo <tobo@yandex-team.ru>2022-02-28 12:04:09 +0300
commitf23d808d6c8b0f50c51b44baad1f919cab389cde (patch)
treeee9e3d708973bee4d463605de2414bbf7946d853
parentfe01c5041a843ee05cf4bf58b020eba53b909caf (diff)
downloadydb-f23d808d6c8b0f50c51b44baad1f919cab389cde.tar.gz
clang-tidy - move-constructor and move-assignment operators should be marked noexcept + pass some args by reference
ref:5da43163e6b3c2499597234dc80ad47042259013
-rw-r--r--util/stream/file.cpp2
-rw-r--r--util/string/builder.h2
-rw-r--r--util/system/mutex.cpp2
-rw-r--r--util/system/mutex.h2
-rw-r--r--util/thread/factory.cpp2
-rw-r--r--util/thread/factory.h2
6 files changed, 6 insertions, 6 deletions
diff --git a/util/stream/file.cpp b/util/stream/file.cpp
index dc5d2f6311..0d3fbfc759 100644
--- a/util/stream/file.cpp
+++ b/util/stream/file.cpp
@@ -72,7 +72,7 @@ void TUnbufferedFileOutput::DoFlush() {
class TMappedFileInput::TImpl: public TBlob {
public:
- inline TImpl(TFile file)
+ inline TImpl(const TFile& file)
: TBlob(TBlob::FromFile(file))
{
}
diff --git a/util/string/builder.h b/util/string/builder.h
index 7b54821151..b2f006199b 100644
--- a/util/string/builder.h
+++ b/util/string/builder.h
@@ -12,7 +12,7 @@ namespace NPrivateStringBuilder {
{
}
- TStringBuilder(TStringBuilder&& rhs)
+ TStringBuilder(TStringBuilder&& rhs) noexcept
: TString(std::move(rhs))
, Out(*this)
{
diff --git a/util/system/mutex.cpp b/util/system/mutex.cpp
index 4041402db9..acb6e87a1b 100644
--- a/util/system/mutex.cpp
+++ b/util/system/mutex.cpp
@@ -125,7 +125,7 @@ TMutex::TMutex()
{
}
-TMutex::TMutex(TMutex&&) = default;
+TMutex::TMutex(TMutex&&) noexcept = default;
TMutex::~TMutex() = default;
diff --git a/util/system/mutex.h b/util/system/mutex.h
index 032630d134..2899ed9a50 100644
--- a/util/system/mutex.h
+++ b/util/system/mutex.h
@@ -36,7 +36,7 @@ public:
class TMutex {
public:
TMutex();
- TMutex(TMutex&&);
+ TMutex(TMutex&&) noexcept;
~TMutex();
void Acquire() noexcept;
diff --git a/util/thread/factory.cpp b/util/thread/factory.cpp
index 48e898f32d..b71d9972bb 100644
--- a/util/thread/factory.cpp
+++ b/util/thread/factory.cpp
@@ -66,7 +66,7 @@ namespace {
};
}
-THolder<IThread> IThreadFactory::Run(std::function<void()> func) {
+THolder<IThread> IThreadFactory::Run(const std::function<void()>& func) {
THolder<IThread> ret(DoCreate());
ret->Run(new ::TThreadFactoryFuncObj(func));
diff --git a/util/thread/factory.h b/util/thread/factory.h
index 561fcbac88..d0520bf435 100644
--- a/util/thread/factory.h
+++ b/util/thread/factory.h
@@ -55,7 +55,7 @@ public:
return ret;
}
- THolder<IThread> Run(std::function<void()> func);
+ THolder<IThread> Run(const std::function<void()>& func);
private:
virtual IThread* DoCreate() = 0;