diff options
author | Rechi <Rechi@users.noreply.github.com> | 2020-10-30 18:53:28 +0000 |
---|---|---|
committer | Rechi <Rechi@users.noreply.github.com> | 2020-10-30 18:53:28 +0000 |
commit | 4628983547db4e83a0b2693671c28a13a2601f0d (patch) | |
tree | 34e687e67fe9e8c93ef2ae9d165871333ec28166 | |
parent | 1f24d35125dc8fb6dac28259acbd207d2125fb9b (diff) |
[clang-tidy] performance-noexcept-move-constructor
-rw-r--r-- | xbmc/messaging/ThreadMessage.h | 20 | ||||
-rw-r--r-- | xbmc/platform/android/peripherals/AndroidJoystickState.cpp | 4 | ||||
-rw-r--r-- | xbmc/platform/android/peripherals/AndroidJoystickState.h | 2 | ||||
-rw-r--r-- | xbmc/utils/ScopeGuard.h | 4 | ||||
-rw-r--r-- | xbmc/utils/Variant.cpp | 4 | ||||
-rw-r--r-- | xbmc/utils/Variant.h | 4 |
6 files changed, 19 insertions, 19 deletions
diff --git a/xbmc/messaging/ThreadMessage.h b/xbmc/messaging/ThreadMessage.h index 2c72a2305d..b60202ad25 100644 --- a/xbmc/messaging/ThreadMessage.h +++ b/xbmc/messaging/ThreadMessage.h @@ -62,16 +62,16 @@ public: ThreadMessage(const ThreadMessage& other) = default; - ThreadMessage(ThreadMessage&& other) + ThreadMessage(ThreadMessage&& other) noexcept : dwMessage(other.dwMessage), - param1(other.param1), - param2(other.param2), - param3(other.param3), - lpVoid(other.lpVoid), - strParam(std::move(other.strParam)), - params(std::move(other.params)), - waitEvent(std::move(other.waitEvent)), - result(std::move(other.result)) + param1(other.param1), + param2(other.param2), + param3(other.param3), + lpVoid(other.lpVoid), + strParam(std::move(other.strParam)), + params(std::move(other.params)), + waitEvent(std::move(other.waitEvent)), + result(std::move(other.result)) { } @@ -91,7 +91,7 @@ public: return *this; } - ThreadMessage& operator=(ThreadMessage&& other) + ThreadMessage& operator=(ThreadMessage&& other) noexcept { if (this == &other) return *this; diff --git a/xbmc/platform/android/peripherals/AndroidJoystickState.cpp b/xbmc/platform/android/peripherals/AndroidJoystickState.cpp index c7c486cd4f..94b3ace3c8 100644 --- a/xbmc/platform/android/peripherals/AndroidJoystickState.cpp +++ b/xbmc/platform/android/peripherals/AndroidJoystickState.cpp @@ -64,8 +64,8 @@ static void MapAxisIds(int axisId, int primaryAxisId, int secondaryAxisId, std:: axisIds.insert(axisIds.begin(), primaryAxisId); } -CAndroidJoystickState::CAndroidJoystickState(CAndroidJoystickState &&other) : - m_deviceId(other.m_deviceId), +CAndroidJoystickState::CAndroidJoystickState(CAndroidJoystickState&& other) noexcept + : m_deviceId(other.m_deviceId), m_buttons(std::move(other.m_buttons)), m_axes(std::move(other.m_axes)), m_analogState(std::move(other.m_analogState)), diff --git a/xbmc/platform/android/peripherals/AndroidJoystickState.h b/xbmc/platform/android/peripherals/AndroidJoystickState.h index 0219a1b998..42ebb83581 100644 --- a/xbmc/platform/android/peripherals/AndroidJoystickState.h +++ b/xbmc/platform/android/peripherals/AndroidJoystickState.h @@ -24,7 +24,7 @@ namespace PERIPHERALS { public: CAndroidJoystickState() = default; - CAndroidJoystickState(CAndroidJoystickState &&other); + CAndroidJoystickState(CAndroidJoystickState&& other) noexcept; virtual ~CAndroidJoystickState(); int GetDeviceId() const { return m_deviceId; } diff --git a/xbmc/utils/ScopeGuard.h b/xbmc/utils/ScopeGuard.h index a1aa0a6eb3..2f731fbeb3 100644 --- a/xbmc/utils/ScopeGuard.h +++ b/xbmc/utils/ScopeGuard.h @@ -89,13 +89,13 @@ public: CScopeGuard& operator= (const CScopeGuard& rhs) = delete; //Allow moving - CScopeGuard(CScopeGuard&& rhs) + CScopeGuard(CScopeGuard&& rhs) noexcept : m_handle{std::move(rhs.m_handle)}, m_deleter{std::move(rhs.m_deleter)} { // Bring moved-from object into released state so destructor will not do anything rhs.release(); } - CScopeGuard& operator=(CScopeGuard&& rhs) + CScopeGuard& operator=(CScopeGuard&& rhs) noexcept { attach(rhs.release()); m_deleter = std::move(rhs.m_deleter); diff --git a/xbmc/utils/Variant.cpp b/xbmc/utils/Variant.cpp index d6cf0d6e84..8ea688ab81 100644 --- a/xbmc/utils/Variant.cpp +++ b/xbmc/utils/Variant.cpp @@ -282,7 +282,7 @@ CVariant::CVariant(const CVariant &variant) *this = variant; } -CVariant::CVariant(CVariant&& rhs) +CVariant::CVariant(CVariant&& rhs) noexcept { //Set this so that operator= don't try and run cleanup //when we're not initialized. @@ -624,7 +624,7 @@ CVariant &CVariant::operator=(const CVariant &rhs) return *this; } -CVariant& CVariant::operator=(CVariant&& rhs) +CVariant& CVariant::operator=(CVariant&& rhs) noexcept { if (m_type == VariantTypeConstNull || this == &rhs) return *this; diff --git a/xbmc/utils/Variant.h b/xbmc/utils/Variant.h index 45f8e9084e..9d48a3df23 100644 --- a/xbmc/utils/Variant.h +++ b/xbmc/utils/Variant.h @@ -64,7 +64,7 @@ public: CVariant(const std::map<std::string, std::string> &strMap); CVariant(const std::map<std::string, CVariant> &variantMap); CVariant(const CVariant &variant); - CVariant(CVariant &&rhs); + CVariant(CVariant&& rhs) noexcept; ~CVariant(); @@ -98,7 +98,7 @@ public: const CVariant &operator[](unsigned int position) const; CVariant &operator=(const CVariant &rhs); - CVariant &operator=(CVariant &&rhs); + CVariant& operator=(CVariant&& rhs) noexcept; bool operator==(const CVariant &rhs) const; bool operator!=(const CVariant &rhs) const { return !(*this == rhs); } |