From: Eunki, Hong Date: Mon, 17 Mar 2025 07:24:50 +0000 (+0900) Subject: Make move operation as noexcept X-Git-Tag: dali_2.4.12~8^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6fb850333922ba73223939c980025f54862ccb64;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Make move operation as noexcept It will sightly improve the performance when we use std::vector<> Change-Id: I2b2e3f34165ff37e52afd7b58aeb299c75c0116d Signed-off-by: Eunki, Hong --- diff --git a/dali/devel-api/adaptor-framework/animated-image-loading.h b/dali/devel-api/adaptor-framework/animated-image-loading.h index 2f07eb948..e2ef921cc 100644 --- a/dali/devel-api/adaptor-framework/animated-image-loading.h +++ b/dali/devel-api/adaptor-framework/animated-image-loading.h @@ -2,7 +2,7 @@ #define DALI_ANIMATED_IMAGE_LOADING_H /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -20,9 +20,9 @@ // EXTERNAL INCLUDES #include #include +#include #include #include -#include // INTERNAL INCLUDES #include @@ -100,7 +100,7 @@ public: * * @param[in] move The AnimatedImageLoading to move */ - AnimatedImageLoading(AnimatedImageLoading&& move) = default; + AnimatedImageLoading(AnimatedImageLoading&& move) noexcept = default; /** * @brief Move assignment operator @@ -108,7 +108,7 @@ public: * @param[in] rhs The AnimatedImageLoading to move * @return A reference to this */ - AnimatedImageLoading& operator=(AnimatedImageLoading&& rhs) = default; + AnimatedImageLoading& operator=(AnimatedImageLoading&& rhs) noexcept = default; /** * @brief Destructor @@ -127,8 +127,8 @@ public: * @return Dali::Devel::PixelBuffer The loaded PixelBuffer. If loading is fail, return empty handle. */ Dali::Devel::PixelBuffer LoadFrame(uint32_t frameIndex, - ImageDimensions size = ImageDimensions(), - Dali::FittingMode::Type fittingMode = Dali::FittingMode::SCALE_TO_FILL, + ImageDimensions size = ImageDimensions(), + Dali::FittingMode::Type fittingMode = Dali::FittingMode::SCALE_TO_FILL, Dali::SamplingMode::Type samplingMode = Dali::SamplingMode::BOX_THEN_LINEAR); /** diff --git a/dali/devel-api/adaptor-framework/color-controller.cpp b/dali/devel-api/adaptor-framework/color-controller.cpp index 82518e64b..e415aa41d 100644 --- a/dali/devel-api/adaptor-framework/color-controller.cpp +++ b/dali/devel-api/adaptor-framework/color-controller.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -31,9 +31,9 @@ ColorController::ColorController(const ColorController& controller) = default; ColorController& ColorController::operator=(const ColorController& rhs) = default; -ColorController::ColorController(ColorController&& controller) = default; +ColorController::ColorController(ColorController&& controller) noexcept = default; -ColorController& ColorController::operator=(ColorController&& rhs) = default; +ColorController& ColorController::operator=(ColorController&& rhs) noexcept = default; ColorController ColorController::Get() { diff --git a/dali/devel-api/adaptor-framework/color-controller.h b/dali/devel-api/adaptor-framework/color-controller.h index 1a12cc645..80aed45f5 100644 --- a/dali/devel-api/adaptor-framework/color-controller.h +++ b/dali/devel-api/adaptor-framework/color-controller.h @@ -2,7 +2,7 @@ #define DALI_COLOR_CONTROLLER_H /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -72,7 +72,7 @@ public: * The move will point to the same implementation as the original. * @param[in] colorController The Color Controller to move from. */ - ColorController(ColorController&& colorController); + ColorController(ColorController&& colorController) noexcept; /** * @brief This move assignment operator is required for (smart) pointer semantics. @@ -80,7 +80,7 @@ public: * @param [in] rhs A reference to the moved handle * @return A reference to this */ - ColorController& operator=(ColorController&& rhs); + ColorController& operator=(ColorController&& rhs) noexcept; /** * @brief Retrieve the initialized instance of the ColorController. diff --git a/dali/devel-api/adaptor-framework/file-stream.cpp b/dali/devel-api/adaptor-framework/file-stream.cpp index a2e09490d..b3227cfc1 100644 --- a/dali/devel-api/adaptor-framework/file-stream.cpp +++ b/dali/devel-api/adaptor-framework/file-stream.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -39,9 +39,9 @@ FileStream::FileStream(Dali::Vector& buffer, size_t dataSize, uint8_t m mImpl.reset(new Impl(buffer, dataSize, mode)); } -FileStream::FileStream(FileStream&&) = default; +FileStream::FileStream(FileStream&&) noexcept = default; -FileStream& FileStream::operator=(FileStream&&) = default; +FileStream& FileStream::operator=(FileStream&&) noexcept = default; FileStream::~FileStream() = default; diff --git a/dali/devel-api/adaptor-framework/file-stream.h b/dali/devel-api/adaptor-framework/file-stream.h index 17636f2af..912c901b0 100644 --- a/dali/devel-api/adaptor-framework/file-stream.h +++ b/dali/devel-api/adaptor-framework/file-stream.h @@ -2,7 +2,7 @@ #define DALI_FILE_STREAM_H /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -75,7 +75,7 @@ public: /** * Default move constructor */ - FileStream(FileStream&&); + FileStream(FileStream&&) noexcept; /** * Non copyable @@ -90,7 +90,7 @@ public: /** * Move assignable */ - FileStream& operator=(FileStream&&); + FileStream& operator=(FileStream&&) noexcept; /** * Destructor diff --git a/dali/devel-api/adaptor-framework/gl-window.cpp b/dali/devel-api/adaptor-framework/gl-window.cpp index 07c78d790..a9af42ad6 100644 --- a/dali/devel-api/adaptor-framework/gl-window.cpp +++ b/dali/devel-api/adaptor-framework/gl-window.cpp @@ -109,9 +109,9 @@ GlWindow::GlWindow(const GlWindow& handle) = default; GlWindow& GlWindow::operator=(const GlWindow& rhs) = default; -GlWindow::GlWindow(GlWindow&& rhs) = default; +GlWindow::GlWindow(GlWindow&& rhs) noexcept = default; -GlWindow& GlWindow::operator=(GlWindow&& rhs) = default; +GlWindow& GlWindow::operator=(GlWindow&& rhs) noexcept = default; void GlWindow::SetGraphicsConfig(bool depth, bool stencil, int msaa, GlesVersion version) { diff --git a/dali/devel-api/adaptor-framework/gl-window.h b/dali/devel-api/adaptor-framework/gl-window.h index f132b1250..3dc379840 100644 --- a/dali/devel-api/adaptor-framework/gl-window.h +++ b/dali/devel-api/adaptor-framework/gl-window.h @@ -158,7 +158,7 @@ public: * * @param[in] rhs A reference to the moved handle */ - GlWindow(GlWindow&& rhs); + GlWindow(GlWindow&& rhs) noexcept; /** * @brief Move assignment operator. @@ -166,7 +166,7 @@ public: * @param[in] rhs A reference to the moved handle * @return A reference to this handle */ - GlWindow& operator=(GlWindow&& rhs); + GlWindow& operator=(GlWindow&& rhs) noexcept; /** * @brief Sets graphics configuration for GlWindow diff --git a/dali/devel-api/adaptor-framework/offscreen-window.cpp b/dali/devel-api/adaptor-framework/offscreen-window.cpp index 548d5f7a8..601781966 100644 --- a/dali/devel-api/adaptor-framework/offscreen-window.cpp +++ b/dali/devel-api/adaptor-framework/offscreen-window.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -51,9 +51,9 @@ OffscreenWindow::OffscreenWindow(const OffscreenWindow& window) = default; OffscreenWindow& OffscreenWindow::operator=(const OffscreenWindow& window) = default; -OffscreenWindow::OffscreenWindow(OffscreenWindow&& window) = default; +OffscreenWindow::OffscreenWindow(OffscreenWindow&& window) noexcept = default; -OffscreenWindow& OffscreenWindow::operator=(OffscreenWindow&& window) = default; +OffscreenWindow& OffscreenWindow::operator=(OffscreenWindow&& window) noexcept = default; OffscreenWindow::~OffscreenWindow() = default; diff --git a/dali/devel-api/adaptor-framework/offscreen-window.h b/dali/devel-api/adaptor-framework/offscreen-window.h index 3952ff085..86c831f2f 100644 --- a/dali/devel-api/adaptor-framework/offscreen-window.h +++ b/dali/devel-api/adaptor-framework/offscreen-window.h @@ -2,7 +2,7 @@ #define DALI_OFFSCREEN_WINDOW_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -89,7 +89,7 @@ public: * * @param [in] window A reference to the moved handle */ - OffscreenWindow(OffscreenWindow&& window); + OffscreenWindow(OffscreenWindow&& window) noexcept; /** * @brief Move assignment operator @@ -97,7 +97,7 @@ public: * @param [in] window A reference to the moved handle * @return A reference to this */ - OffscreenWindow& operator=(OffscreenWindow&& window); + OffscreenWindow& operator=(OffscreenWindow&& window) noexcept; /** * @brief Destructor diff --git a/dali/devel-api/adaptor-framework/pixel-buffer.cpp b/dali/devel-api/adaptor-framework/pixel-buffer.cpp index 45d02de34..13ec25d99 100644 --- a/dali/devel-api/adaptor-framework/pixel-buffer.cpp +++ b/dali/devel-api/adaptor-framework/pixel-buffer.cpp @@ -71,9 +71,9 @@ PixelBuffer::PixelBuffer(const PixelBuffer& handle) = default; PixelBuffer& PixelBuffer::operator=(const PixelBuffer& rhs) = default; -PixelBuffer::PixelBuffer(PixelBuffer&& handle) = default; +PixelBuffer::PixelBuffer(PixelBuffer&& handle) noexcept = default; -PixelBuffer& PixelBuffer::operator=(PixelBuffer&& rhs) = default; +PixelBuffer& PixelBuffer::operator=(PixelBuffer&& rhs) noexcept = default; uint32_t PixelBuffer::GetWidth() const { diff --git a/dali/devel-api/adaptor-framework/pixel-buffer.h b/dali/devel-api/adaptor-framework/pixel-buffer.h index c6ee998ef..f748ed5ae 100644 --- a/dali/devel-api/adaptor-framework/pixel-buffer.h +++ b/dali/devel-api/adaptor-framework/pixel-buffer.h @@ -103,7 +103,7 @@ public: * @SINCE_2_1.45 * @param[in] handle A reference to the moved handle */ - PixelBuffer(PixelBuffer&& handle); + PixelBuffer(PixelBuffer&& handle) noexcept; /** * @brief This move assignment operator is required for (smart) pointer semantics. @@ -112,7 +112,7 @@ public: * @param[in] rhs A reference to the moved handle * @return A reference to this object */ - PixelBuffer& operator=(PixelBuffer&& rhs); + PixelBuffer& operator=(PixelBuffer&& rhs) noexcept; /** * Convert to a pixel data and release the pixelBuffer's object. diff --git a/dali/devel-api/adaptor-framework/style-monitor.cpp b/dali/devel-api/adaptor-framework/style-monitor.cpp index a65b61b26..de359042a 100644 --- a/dali/devel-api/adaptor-framework/style-monitor.cpp +++ b/dali/devel-api/adaptor-framework/style-monitor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -31,9 +31,9 @@ StyleMonitor::StyleMonitor(const StyleMonitor& monitor) = default; StyleMonitor& StyleMonitor::operator=(const StyleMonitor& monitor) = default; -StyleMonitor::StyleMonitor(StyleMonitor&& monitor) = default; +StyleMonitor::StyleMonitor(StyleMonitor&& monitor) noexcept = default; -StyleMonitor& StyleMonitor::operator=(StyleMonitor&& monitor) = default; +StyleMonitor& StyleMonitor::operator=(StyleMonitor&& monitor) noexcept = default; StyleMonitor StyleMonitor::StyleMonitor::Get() { diff --git a/dali/devel-api/adaptor-framework/style-monitor.h b/dali/devel-api/adaptor-framework/style-monitor.h index fabf58f1e..fe8eede58 100644 --- a/dali/devel-api/adaptor-framework/style-monitor.h +++ b/dali/devel-api/adaptor-framework/style-monitor.h @@ -2,7 +2,7 @@ #define DALI_STYLE_MONITOR_H /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -82,7 +82,7 @@ public: // Creation & Destruction * The move will point to the same implementation as the original. * @param[in] monitor The Style Monitor to move from. */ - StyleMonitor(StyleMonitor&& monitor); + StyleMonitor(StyleMonitor&& monitor) noexcept; /** * @brief Move assignment operator. @@ -91,7 +91,7 @@ public: // Creation & Destruction * @param[in] monitor The Style Monitor to move from. * @return reference to this object */ - StyleMonitor& operator=(StyleMonitor&& monitor); + StyleMonitor& operator=(StyleMonitor&& monitor) noexcept; /** * @brief Retrieve the initialized instance of the StyleMonitor. @@ -118,7 +118,6 @@ public: // Creation & Destruction static StyleMonitor DownCast(BaseHandle handle); public: // Style Information - /** * @brief Ensure the font client has been created. * diff --git a/dali/devel-api/adaptor-framework/video-player.cpp b/dali/devel-api/adaptor-framework/video-player.cpp index 55370473e..0661f3821 100644 --- a/dali/devel-api/adaptor-framework/video-player.cpp +++ b/dali/devel-api/adaptor-framework/video-player.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -68,9 +68,9 @@ VideoPlayer::VideoPlayer(const VideoPlayer& player) = default; VideoPlayer& VideoPlayer::operator=(const VideoPlayer& player) = default; -VideoPlayer::VideoPlayer(VideoPlayer&& player) = default; +VideoPlayer::VideoPlayer(VideoPlayer&& player) noexcept = default; -VideoPlayer& VideoPlayer::operator=(VideoPlayer&& player) = default; +VideoPlayer& VideoPlayer::operator=(VideoPlayer&& player) noexcept = default; VideoPlayer VideoPlayer::DownCast(BaseHandle handle) { diff --git a/dali/devel-api/adaptor-framework/video-player.h b/dali/devel-api/adaptor-framework/video-player.h index 5a200479f..f7ce63d90 100644 --- a/dali/devel-api/adaptor-framework/video-player.h +++ b/dali/devel-api/adaptor-framework/video-player.h @@ -2,7 +2,7 @@ #define DALI_VIDEO_PLAYER_H /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -98,7 +98,7 @@ public: * @SINCE_2_1.45 * @param[in] player VideoPlayer to move. The moved player will point at the same implementation */ - VideoPlayer(VideoPlayer&& player); + VideoPlayer(VideoPlayer&& player) noexcept; /** * @brief Move assignment operator. @@ -107,7 +107,7 @@ public: * @param[in] player The VideoPlayer to move assign from. * @return The updated VideoPlayer. */ - VideoPlayer& operator=(VideoPlayer&& player); + VideoPlayer& operator=(VideoPlayer&& player) noexcept; /** * @brief Downcast a handle to VideoPlayer handle. diff --git a/dali/devel-api/adaptor-framework/web-engine/web-engine.cpp b/dali/devel-api/adaptor-framework/web-engine/web-engine.cpp index 045fbb778..c9d4c1182 100755 --- a/dali/devel-api/adaptor-framework/web-engine/web-engine.cpp +++ b/dali/devel-api/adaptor-framework/web-engine/web-engine.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -78,9 +78,9 @@ WebEngine::WebEngine(const WebEngine& webEngine) = default; WebEngine& WebEngine::operator=(const WebEngine& webEngine) = default; -WebEngine::WebEngine(WebEngine&& webEngine) = default; +WebEngine::WebEngine(WebEngine&& webEngine) noexcept = default; -WebEngine& WebEngine::operator=(WebEngine&& webEngine) = default; +WebEngine& WebEngine::operator=(WebEngine&& webEngine) noexcept = default; WebEngine WebEngine::DownCast(BaseHandle handle) { diff --git a/dali/devel-api/adaptor-framework/web-engine/web-engine.h b/dali/devel-api/adaptor-framework/web-engine/web-engine.h old mode 100755 new mode 100644 index b5ee7a8c0..1ec587f30 --- a/dali/devel-api/adaptor-framework/web-engine/web-engine.h +++ b/dali/devel-api/adaptor-framework/web-engine/web-engine.h @@ -2,7 +2,7 @@ #define DALI_WEB_ENGINE_H /* - * Copyright (c) 2024 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -100,7 +100,7 @@ public: * * @param[in] WebEngine WebEngine to move. The moved WebEngine will point at the same implementation */ - WebEngine(WebEngine&& WebEngine); + WebEngine(WebEngine&& WebEngine) noexcept; /** * @brief Move assignment operator. @@ -108,7 +108,7 @@ public: * @param[in] WebEngine The WebEngine to assign from. * @return The updated WebEngine. */ - WebEngine& operator=(WebEngine&& WebEngine); + WebEngine& operator=(WebEngine&& WebEngine) noexcept; /** * @brief Downcast a handle to WebEngine handle. @@ -867,7 +867,6 @@ public: */ void RegisterUserMediaPermissionRequestCallback(Dali::WebEnginePlugin::WebEngineUserMediaPermissionRequestCallback callback); - private: // Not intended for application developers /** * @brief Internal constructor diff --git a/dali/devel-api/text-abstraction/font-client.cpp b/dali/devel-api/text-abstraction/font-client.cpp index 245f30e34..b76812c06 100644 --- a/dali/devel-api/text-abstraction/font-client.cpp +++ b/dali/devel-api/text-abstraction/font-client.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -52,9 +52,9 @@ const Size FontClient::MAX_SIZE_FIT_IN_ATLAS(MAX_TEXT_ATLAS_WIDTH - PADDING_TEXT const uint32_t FontClient::NUMBER_OF_POINTS_PER_ONE_UNIT_OF_POINT_SIZE = 64u; //Found this value from toolkit // For Debug -static bool TEXT_PERFORMANCE_LOG_SET = false; -static uint32_t TEXT_PERFORMANCE_LOG_THRESHOLD_TIME = 0u; -constexpr auto TEXT_PERFORMANCE_LOG_THRESHOLD_TIME_ENV = "DALI_TEXT_PERFORMANCE_LOG_THRESHOLD_TIME"; +static bool TEXT_PERFORMANCE_LOG_SET = false; +static uint32_t TEXT_PERFORMANCE_LOG_THRESHOLD_TIME = 0u; +constexpr auto TEXT_PERFORMANCE_LOG_THRESHOLD_TIME_ENV = "DALI_TEXT_PERFORMANCE_LOG_THRESHOLD_TIME"; uint32_t FontClient::GetPerformanceLogThresholdTime() { @@ -62,10 +62,10 @@ uint32_t FontClient::GetPerformanceLogThresholdTime() if(!TEXT_PERFORMANCE_LOG_SET) { // Threshold time in miliseconds. - auto timeString = Dali::EnvironmentVariable::GetEnvironmentVariable(TEXT_PERFORMANCE_LOG_THRESHOLD_TIME_ENV); - time = timeString ? static_cast(std::atoi(timeString)) : 0u; + auto timeString = Dali::EnvironmentVariable::GetEnvironmentVariable(TEXT_PERFORMANCE_LOG_THRESHOLD_TIME_ENV); + time = timeString ? static_cast(std::atoi(timeString)) : 0u; TEXT_PERFORMANCE_LOG_THRESHOLD_TIME = time; - TEXT_PERFORMANCE_LOG_SET = true; + TEXT_PERFORMANCE_LOG_SET = true; } return time; } @@ -112,9 +112,9 @@ FontClient::FontClient(const FontClient& handle) = default; FontClient& FontClient::operator=(const FontClient& handle) = default; -FontClient::FontClient(FontClient&& handle) = default; +FontClient::FontClient(FontClient&& handle) noexcept = default; -FontClient& FontClient::operator=(FontClient&& handle) = default; +FontClient& FontClient::operator=(FontClient&& handle) noexcept = default; void FontClient::ClearCache() { diff --git a/dali/devel-api/text-abstraction/font-client.h b/dali/devel-api/text-abstraction/font-client.h index 6ea945842..0539f63dc 100644 --- a/dali/devel-api/text-abstraction/font-client.h +++ b/dali/devel-api/text-abstraction/font-client.h @@ -2,7 +2,7 @@ #define DALI_PLATFORM_TEXT_ABSTRACTION_FONT_CLIENT_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -155,7 +155,7 @@ public: * * @param[in] handle A reference to the moved handle. */ - FontClient(FontClient&& handle); + FontClient(FontClient&& handle) noexcept; /** * @brief This move assignment operator is required for (smart) pointer semantics. @@ -163,7 +163,7 @@ public: * @param [in] handle A reference to the moved handle. * @return A reference to this. */ - FontClient& operator=(FontClient&& handle); + FontClient& operator=(FontClient&& handle) noexcept; //////////////////////////////////////// // Font management and validation. diff --git a/dali/internal/graphics/gles-impl/gles-graphics-command-buffer.h b/dali/internal/graphics/gles-impl/gles-graphics-command-buffer.h index e24d41405..29420a534 100644 --- a/dali/internal/graphics/gles-impl/gles-graphics-command-buffer.h +++ b/dali/internal/graphics/gles-impl/gles-graphics-command-buffer.h @@ -100,7 +100,7 @@ struct Command */ Command(const Command& rhs) = default; Command& operator=(const Command& rhs) = default; - Command(Command&& rhs) noexcept = delete; + Command(Command&& rhs) = delete; Command& operator=(Command&& rhs) = delete; CommandType type{CommandType::FLUSH}; ///< Type of command diff --git a/dali/internal/graphics/gles-impl/gles-graphics-pipeline-cache.cpp b/dali/internal/graphics/gles-impl/gles-graphics-pipeline-cache.cpp index c343c2929..1a15cca71 100644 --- a/dali/internal/graphics/gles-impl/gles-graphics-pipeline-cache.cpp +++ b/dali/internal/graphics/gles-impl/gles-graphics-pipeline-cache.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -258,8 +258,8 @@ struct PipelineCache::Impl ~CacheEntry() = default; - CacheEntry(CacheEntry&&) = default; - CacheEntry& operator=(CacheEntry&&) = default; + CacheEntry(CacheEntry&&) noexcept = default; + CacheEntry& operator=(CacheEntry&&) noexcept = default; UniquePtr pipeline{nullptr}; uint32_t stateBitmask{0u}; diff --git a/dali/internal/graphics/gles-impl/gles-graphics-reflection.h b/dali/internal/graphics/gles-impl/gles-graphics-reflection.h index 6f6e96129..d8a82c5aa 100644 --- a/dali/internal/graphics/gles-impl/gles-graphics-reflection.h +++ b/dali/internal/graphics/gles-impl/gles-graphics-reflection.h @@ -2,7 +2,7 @@ #define DALI_GRAPHICS_GLES_REFLECTION_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -246,8 +246,8 @@ public: void SortOpaques(); protected: - Reflection(Reflection&&) = default; - Reflection& operator=(Reflection&&) = default; + Reflection(Reflection&&) noexcept = default; + Reflection& operator=(Reflection&&) noexcept = default; private: Graphics::EglGraphicsController& mController; ///< The Graphics controller diff --git a/dali/internal/graphics/vulkan-impl/vulkan-reflection.h b/dali/internal/graphics/vulkan-impl/vulkan-reflection.h index c85c12d78..c12b7333a 100644 --- a/dali/internal/graphics/vulkan-impl/vulkan-reflection.h +++ b/dali/internal/graphics/vulkan-impl/vulkan-reflection.h @@ -212,8 +212,8 @@ private: void BuildReflection(); protected: - Reflection(Reflection&&) = default; - Reflection& operator=(Reflection&&) = default; + Reflection(Reflection&&) noexcept = default; + Reflection& operator=(Reflection&&) noexcept = default; private: VulkanGraphicsController& mController; ///< The Graphics controller diff --git a/dali/internal/graphics/vulkan-impl/vulkan-resource-transfer-request.h b/dali/internal/graphics/vulkan-impl/vulkan-resource-transfer-request.h index d2f71d772..9c9c85a2f 100644 --- a/dali/internal/graphics/vulkan-impl/vulkan-resource-transfer-request.h +++ b/dali/internal/graphics/vulkan-impl/vulkan-resource-transfer-request.h @@ -76,11 +76,11 @@ struct ResourceTransferRequest bool deferredTransferMode{true}; // Vulkan implementation prefers deferred mode // delete copy - ResourceTransferRequest(const ResourceTransferRequest&) = delete; + ResourceTransferRequest(const ResourceTransferRequest&) = delete; ResourceTransferRequest& operator=(const ResourceTransferRequest&) = delete; - ResourceTransferRequest& operator=(ResourceTransferRequest&& obj) = delete; + ResourceTransferRequest& operator=(ResourceTransferRequest&& obj) = delete; - ResourceTransferRequest(ResourceTransferRequest&& obj) + ResourceTransferRequest(ResourceTransferRequest&& obj) noexcept { requestType = obj.requestType; deferredTransferMode = obj.deferredTransferMode; diff --git a/dali/internal/imaging/common/animated-image-loading-impl.h b/dali/internal/imaging/common/animated-image-loading-impl.h index a15005339..66a38f158 100644 --- a/dali/internal/imaging/common/animated-image-loading-impl.h +++ b/dali/internal/imaging/common/animated-image-loading-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_ANIMATED_IMAGE_LOADING_IMPL_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -26,8 +26,8 @@ // INTERNAL INCLUDES #include -#include #include +#include namespace Dali { @@ -57,9 +57,9 @@ public: // Moveable but not copyable AnimatedImageLoading(const AnimatedImageLoading&); - AnimatedImageLoading& operator =(const AnimatedImageLoading&); - AnimatedImageLoading(AnimatedImageLoading&&) = default; - AnimatedImageLoading& operator=(AnimatedImageLoading&&) = default; + AnimatedImageLoading& operator =(const AnimatedImageLoading&); + AnimatedImageLoading(AnimatedImageLoading&&) noexcept = default; + AnimatedImageLoading& operator=(AnimatedImageLoading&&) noexcept = default; /** * @brief Destructor @@ -87,7 +87,6 @@ public: } public: - /** * @copydoc Dali::AnimatedImageLoading::GetImageSize() */ diff --git a/dali/internal/imaging/common/gif-loading.cpp b/dali/internal/imaging/common/gif-loading.cpp index 06723bb69..6f84d4a17 100644 --- a/dali/internal/imaging/common/gif-loading.cpp +++ b/dali/internal/imaging/common/gif-loading.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -1575,8 +1575,8 @@ public: // Moveable but not copyable Impl(const Impl&) = delete; Impl& operator=(const Impl&) = delete; - Impl(Impl&&) = default; - Impl& operator=(Impl&&) = default; + Impl(Impl&&) noexcept = default; + Impl& operator=(Impl&&) noexcept = default; std::string mUrl; LoaderInfo loaderInfo; diff --git a/dali/internal/imaging/common/webp-loading.cpp b/dali/internal/imaging/common/webp-loading.cpp index ed63f23dd..fe2a66f40 100644 --- a/dali/internal/imaging/common/webp-loading.cpp +++ b/dali/internal/imaging/common/webp-loading.cpp @@ -272,8 +272,8 @@ public: Impl(const Impl&) = delete; Impl& operator=(const Impl&) = delete; - Impl(Impl&&) = default; - Impl& operator=(Impl&&) = default; + Impl(Impl&&) noexcept = default; + Impl& operator=(Impl&&) noexcept = default; ~Impl() { diff --git a/dali/internal/system/common/async-task-manager-impl.cpp b/dali/internal/system/common/async-task-manager-impl.cpp index e06b931be..7139ece98 100644 --- a/dali/internal/system/common/async-task-manager-impl.cpp +++ b/dali/internal/system/common/async-task-manager-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -1214,7 +1214,7 @@ AsyncTaskManager::TaskHelper::TaskHelper(AsyncTaskManager& asyncTaskManager) { } -AsyncTaskManager::TaskHelper::TaskHelper(TaskHelper&& rhs) +AsyncTaskManager::TaskHelper::TaskHelper(TaskHelper&& rhs) noexcept : TaskHelper(std::move(rhs.mProcessor), rhs.mAsyncTaskManager) { } diff --git a/dali/internal/system/common/async-task-manager-impl.h b/dali/internal/system/common/async-task-manager-impl.h index 4edf53830..083500a41 100644 --- a/dali/internal/system/common/async-task-manager-impl.h +++ b/dali/internal/system/common/async-task-manager-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_ASYNC_TASK_MANAGER_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -205,7 +205,7 @@ private: TaskHelper(const TaskHelper&) = delete; TaskHelper& operator=(const TaskHelper&) = delete; - TaskHelper(TaskHelper&& rhs); + TaskHelper(TaskHelper&& rhs) noexcept; TaskHelper& operator=(TaskHelper&& rhs) = delete; private: diff --git a/dali/internal/text/text-abstraction/plugin/font-face-cache-item.cpp b/dali/internal/text/text-abstraction/plugin/font-face-cache-item.cpp index b9e7d9bea..6dfb40170 100644 --- a/dali/internal/text/text-abstraction/plugin/font-face-cache-item.cpp +++ b/dali/internal/text/text-abstraction/plugin/font-face-cache-item.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -80,9 +80,9 @@ inline GlyphCacheManager::CompressionPolicyType GetRenderedGlyphCompressPolicy() { static auto policyString = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_RENDERED_GLYPH_COMPRESS_POLICY); - static auto policy = policyString ? policyString[0] == 's' || policyString[0] == 'S' ? GlyphCacheManager::CompressionPolicyType::SPEED - : policyString[0] == 'm' || policyString[0] == 'M' ? GlyphCacheManager::CompressionPolicyType::MEMORY - : DEFAULT_RENDERED_GLYPH_COMPRESS_POLICY + static auto policy = policyString ? policyString[0] == 's' || policyString[0] == 'S' ? GlyphCacheManager::CompressionPolicyType::SPEED + : policyString[0] == 'm' || policyString[0] == 'M' ? GlyphCacheManager::CompressionPolicyType::MEMORY + : DEFAULT_RENDERED_GLYPH_COMPRESS_POLICY : DEFAULT_RENDERED_GLYPH_COMPRESS_POLICY; return policy; } @@ -146,7 +146,7 @@ FontFaceCacheItem::FontFaceCacheItem(const FT_Library& freeTypeLibrary, // Move constructor. font client plugin container may call this. // Note that we make nullptr of some reference sensitive values here. -FontFaceCacheItem::FontFaceCacheItem(FontFaceCacheItem&& rhs) +FontFaceCacheItem::FontFaceCacheItem(FontFaceCacheItem&& rhs) noexcept : mFreeTypeLibrary(rhs.mFreeTypeLibrary) { mFreeTypeFace = rhs.mFreeTypeFace; diff --git a/dali/internal/text/text-abstraction/plugin/font-face-cache-item.h b/dali/internal/text/text-abstraction/plugin/font-face-cache-item.h index 6fe80022f..26d3589d6 100644 --- a/dali/internal/text/text-abstraction/plugin/font-face-cache-item.h +++ b/dali/internal/text/text-abstraction/plugin/font-face-cache-item.h @@ -2,7 +2,7 @@ #define DALI_TEXT_ABSTRACTION_INTERNAL_FONT_FACE_CACHE_ITEM_H /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -62,7 +62,7 @@ struct FontFaceCacheItem : public FontCacheItemInterface bool hasColorTables); FontFaceCacheItem(const FontFaceCacheItem& rhs) = delete; // Do not use copy construct - FontFaceCacheItem(FontFaceCacheItem&& rhs); + FontFaceCacheItem(FontFaceCacheItem&& rhs) noexcept; ~FontFaceCacheItem(); diff --git a/dali/internal/text/text-abstraction/plugin/lru-cache-container.h b/dali/internal/text/text-abstraction/plugin/lru-cache-container.h index 1f0888470..651c3e7f6 100644 --- a/dali/internal/text/text-abstraction/plugin/lru-cache-container.h +++ b/dali/internal/text/text-abstraction/plugin/lru-cache-container.h @@ -2,7 +2,7 @@ #define DALI_TEXT_ABSTRACTION_INTERNAL_LRU_CACHE_CONTAINER_H /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -58,7 +58,7 @@ public: LRUCacheContainer(LRUCacheContainer&& rhs) = default; LRUCacheContainer& operator=(const LRUCacheContainer& rhs) = default; - LRUCacheContainer& operator=(LRUCacheContainer&& rhs) = default; + LRUCacheContainer& operator=(LRUCacheContainer&& rhs) noexcept = default; public: // Public struct area. @@ -108,13 +108,13 @@ public: } // Move constructor & assign - iterator(iterator&& rhs) + iterator(iterator&& rhs) noexcept : owner(rhs.owner), id(rhs.id) { } - iterator& operator=(iterator&& rhs) + iterator& operator=(iterator&& rhs) noexcept { this->owner = rhs.owner; this->id = rhs.id; diff --git a/dali/public-api/adaptor-framework/round-robin-container-view.h b/dali/public-api/adaptor-framework/round-robin-container-view.h index 66d1e3255..daae17066 100644 --- a/dali/public-api/adaptor-framework/round-robin-container-view.h +++ b/dali/public-api/adaptor-framework/round-robin-container-view.h @@ -2,7 +2,7 @@ #define DALI_ROUND_ROBIN_CONTAINER_VIEW_H /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 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. @@ -103,8 +103,8 @@ public: RoundRobinContainerView(const RoundRobinContainerView&) = delete; RoundRobinContainerView& operator=(const RoundRobinContainerView&) = delete; - RoundRobinContainerView(RoundRobinContainerView&&) = default; - RoundRobinContainerView& operator=(RoundRobinContainerView&&) = default; + RoundRobinContainerView(RoundRobinContainerView&&) noexcept = default; + RoundRobinContainerView& operator=(RoundRobinContainerView&&) noexcept = default; private: /**