From: Eunki Hong Date: Wed, 15 Mar 2023 16:50:30 +0000 (+0900) Subject: Add some more noexcept tag (devel-api, internal) X-Git-Tag: dali_2.2.20~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F27%2F289927%2F3;p=platform%2Fcore%2Fuifw%2Fdali-core.git Add some more noexcept tag (devel-api, internal) Change-Id: I01b0fc6080da4aa91dc3dd50fc2650ab7f18d45d Signed-off-by: Eunki Hong --- diff --git a/dali/devel-api/common/stage.cpp b/dali/devel-api/common/stage.cpp index f554064..02f361f 100644 --- a/dali/devel-api/common/stage.cpp +++ b/dali/devel-api/common/stage.cpp @@ -38,9 +38,9 @@ Stage::Stage(const Stage& handle) = default; Stage& Stage::operator=(const Stage& rhs) = default; -Stage::Stage(Stage&& handle) = default; +Stage::Stage(Stage&& handle) noexcept = default; -Stage& Stage::operator=(Stage&& rhs) = default; +Stage& Stage::operator=(Stage&& rhs) noexcept = default; Stage::Stage(Internal::Stage* internal) : BaseHandle(internal) diff --git a/dali/devel-api/common/stage.h b/dali/devel-api/common/stage.h index 86d17c4..cf271cf 100644 --- a/dali/devel-api/common/stage.h +++ b/dali/devel-api/common/stage.h @@ -140,7 +140,7 @@ public: * * @param[in] handle A reference to the moved handle */ - Stage(Stage&& handle); + Stage(Stage&& handle) noexcept; /** * @brief This move assignment operator is required for (smart) pointer semantics. @@ -148,7 +148,7 @@ public: * @param[in] rhs A reference to the moved handle * @return A reference to this */ - Stage& operator=(Stage&& rhs); + Stage& operator=(Stage&& rhs) noexcept; // Containment diff --git a/dali/internal/common/owner-pointer.h b/dali/internal/common/owner-pointer.h index 28fe69e..b821205 100644 --- a/dali/internal/common/owner-pointer.h +++ b/dali/internal/common/owner-pointer.h @@ -64,7 +64,7 @@ public: * Move constructor. Passes the ownership of a pointer to another. * @param[in] other The pointer that gives away the ownership. */ - OwnerPointer(OwnerPointer&& other) + OwnerPointer(OwnerPointer&& other) noexcept : mObject(nullptr) { Swap(other); @@ -91,7 +91,7 @@ public: * Move assignment operator. Passes the ownership of a pointer to another. * @param[in] other The pointer that gives away the ownership. */ - OwnerPointer& operator=(OwnerPointer&& other) + OwnerPointer& operator=(OwnerPointer&& other) noexcept { // Reuse operator= return operator=(other); diff --git a/dali/internal/event/events/actor-observer.cpp b/dali/internal/event/events/actor-observer.cpp index aa8395e..f1da6e0 100644 --- a/dali/internal/event/events/actor-observer.cpp +++ b/dali/internal/event/events/actor-observer.cpp @@ -52,13 +52,13 @@ ActorObserver::~ActorObserver() delete mRemoveCallback; } -ActorObserver::ActorObserver(ActorObserver&& other) +ActorObserver::ActorObserver(ActorObserver&& other) noexcept : ActorObserver(nullptr) { operator=(std::move(other)); } -ActorObserver& ActorObserver::operator=(ActorObserver&& other) +ActorObserver& ActorObserver::operator=(ActorObserver&& other) noexcept { if(this != &other) { diff --git a/dali/internal/event/events/actor-observer.h b/dali/internal/event/events/actor-observer.h index 329930a..032d891 100644 --- a/dali/internal/event/events/actor-observer.h +++ b/dali/internal/event/events/actor-observer.h @@ -71,7 +71,7 @@ public: * @note The other's actor is appropriately disconnected. * @note Ownership of callback is passed onto this class. */ - ActorObserver(ActorObserver&& other); + ActorObserver(ActorObserver&& other) noexcept; /** * Move assignment operator. @@ -81,7 +81,7 @@ public: * @note The other's actor is appropriately disconnected. * @note Ownership of callback is passed onto this class. */ - ActorObserver& operator=(ActorObserver&& other); + ActorObserver& operator=(ActorObserver&& other) noexcept; // Not copyable