From 8da4440aaf766ca9adc054517826a455a8cb8ded Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 12 Mar 2024 10:02:56 +0100 Subject: Add documentation for NewKit's move and forward functions. Signed-off-by: Amlal El Mahrouss --- Private/NewKit/Defines.hpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Private/NewKit/Defines.hpp b/Private/NewKit/Defines.hpp index 8f8d4154..4527df91 100644 --- a/Private/NewKit/Defines.hpp +++ b/Private/NewKit/Defines.hpp @@ -68,20 +68,28 @@ using Lba = SSizeT; enum class Endian : UChar { kEndianLittle, kEndianBig, kEndianMixed, kCount }; +/// @brief Forward object. +/// @tparam Args the object type. +/// @param arg the object. +/// @return object's rvalue template -Args &&forward(Args &arg) { +inline Args &&forward(Args &arg) { return static_cast(arg); } +/// @brief Move object. +/// @tparam Args the object type. +/// @param arg the object. +/// @return object's rvalue template -Args &&move(Args &&arg) { +inline Args &&move(Args &&arg) { return static_cast(arg); } } // namespace HCore #define DEDUCE_ENDIAN(address, value) \ (((reinterpret_cast(address)[0]) == (value)) \ - ? (HCore::Endian::kEndianBig) \ + ? (HCore::Endian::kEndianBig) \ : (HCore::Endian::kEndianLittle)) #define Yes (true) -- cgit v1.2.3