Ensure BaseHandle class move noexcept (core public-api)
[platform/core/uifw/dali-core.git] / dali / public-api / actors / actor.cpp
index 0b455bd..0c1b911 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@
 #include <dali/public-api/math/radian.h>
 #include <dali/public-api/math/vector2.h>
 
+#include <dali/internal/common/const-string.h>
 #include <dali/internal/event/actors/actor-impl.h>
 #include <dali/internal/event/actors/layer-impl.h>
 #include <dali/internal/event/animation/constraint-impl.h>
@@ -53,9 +54,9 @@ Actor::Actor(const Actor& copy) = default;
 
 Actor& Actor::operator=(const Actor& rhs) = default;
 
-Actor::Actor(Actor&& rhs) = default;
+Actor::Actor(Actor&& rhs) noexcept = default;
 
-Actor& Actor::operator=(Actor&& rhs) = default;
+Actor& Actor::operator=(Actor&& rhs) noexcept = default;
 
 Layer Actor::GetLayer()
 {
@@ -88,9 +89,9 @@ Actor Actor::GetChildAt(uint32_t index) const
   return Actor(child.Get());
 }
 
-Actor Actor::FindChildByName(const std::string& actorName)
+Actor Actor::FindChildByName(std::string_view actorName)
 {
-  Internal::ActorPtr child = GetImplementation(*this).FindChildByName(actorName);
+  Internal::ActorPtr child = GetImplementation(*this).FindChildByName(Internal::ConstString(actorName));
   return Actor(child.Get());
 }