From 7525c9a5ddae4a6007defde5ab07a1ebc93aadb3 Mon Sep 17 00:00:00 2001 From: Redstone1024 <2824517378@qq.com> Date: Thu, 5 Dec 2024 16:38:49 +0800 Subject: [PATCH] refactor(*): move container and iterator tools to miscellaneous --- Redcraft.Utility/Source/Public/Containers/Array.h | 4 ++-- Redcraft.Utility/Source/Public/Containers/ArrayView.h | 4 ++-- Redcraft.Utility/Source/Public/Containers/Bitset.h | 4 ++-- Redcraft.Utility/Source/Public/Containers/Containers.h | 1 - Redcraft.Utility/Source/Public/Containers/List.h | 4 ++-- Redcraft.Utility/Source/Public/Containers/StaticArray.h | 4 ++-- Redcraft.Utility/Source/Public/Containers/StaticBitset.h | 4 ++-- .../Source/Public/Miscellaneous/ConstantIterator.h | 2 +- .../Source/Public/{Templates => Miscellaneous}/Container.h | 0 .../Source/Public/{Containers => Miscellaneous}/Iterator.h | 0 Redcraft.Utility/Source/Public/String/String.h | 4 ++-- Redcraft.Utility/Source/Public/String/StringView.h | 4 ++-- Redcraft.Utility/Source/Public/Templates/Meta.h | 4 ++-- Redcraft.Utility/Source/Public/Templates/Templates.h | 1 - 14 files changed, 19 insertions(+), 21 deletions(-) rename Redcraft.Utility/Source/Public/{Templates => Miscellaneous}/Container.h (100%) rename Redcraft.Utility/Source/Public/{Containers => Miscellaneous}/Iterator.h (100%) diff --git a/Redcraft.Utility/Source/Public/Containers/Array.h b/Redcraft.Utility/Source/Public/Containers/Array.h index d21a27d..69e3b06 100644 --- a/Redcraft.Utility/Source/Public/Containers/Array.h +++ b/Redcraft.Utility/Source/Public/Containers/Array.h @@ -4,11 +4,11 @@ #include "Memory/Allocator.h" #include "Templates/Utility.h" #include "Templates/TypeHash.h" -#include "Templates/Container.h" -#include "Containers/Iterator.h" #include "TypeTraits/TypeTraits.h" #include "Miscellaneous/Compare.h" #include "Memory/MemoryOperator.h" +#include "Miscellaneous/Iterator.h" +#include "Miscellaneous/Container.h" #include "Miscellaneous/AssertionMacros.h" #include "Miscellaneous/ConstantIterator.h" diff --git a/Redcraft.Utility/Source/Public/Containers/ArrayView.h b/Redcraft.Utility/Source/Public/Containers/ArrayView.h index 10913ca..9de400f 100644 --- a/Redcraft.Utility/Source/Public/Containers/ArrayView.h +++ b/Redcraft.Utility/Source/Public/Containers/ArrayView.h @@ -6,11 +6,11 @@ #include "Containers/Array.h" #include "Templates/Utility.h" #include "Templates/TypeHash.h" -#include "Templates/Container.h" -#include "Containers/Iterator.h" #include "Containers/StaticArray.h" #include "TypeTraits/TypeTraits.h" #include "Miscellaneous/Compare.h" +#include "Miscellaneous/Iterator.h" +#include "Miscellaneous/Container.h" #include "Miscellaneous/AssertionMacros.h" NAMESPACE_REDCRAFT_BEGIN diff --git a/Redcraft.Utility/Source/Public/Containers/Bitset.h b/Redcraft.Utility/Source/Public/Containers/Bitset.h index f03a044..e1bb78b 100644 --- a/Redcraft.Utility/Source/Public/Containers/Bitset.h +++ b/Redcraft.Utility/Source/Public/Containers/Bitset.h @@ -5,12 +5,12 @@ #include "Memory/Allocator.h" #include "Templates/Utility.h" #include "Templates/TypeHash.h" -#include "Templates/Container.h" -#include "Containers/Iterator.h" #include "Templates/Noncopyable.h" #include "TypeTraits/TypeTraits.h" #include "Miscellaneous/Compare.h" #include "Memory/MemoryOperator.h" +#include "Miscellaneous/Iterator.h" +#include "Miscellaneous/Container.h" #include "Miscellaneous/AssertionMacros.h" NAMESPACE_REDCRAFT_BEGIN diff --git a/Redcraft.Utility/Source/Public/Containers/Containers.h b/Redcraft.Utility/Source/Public/Containers/Containers.h index 9e3e5b6..fa5ea41 100644 --- a/Redcraft.Utility/Source/Public/Containers/Containers.h +++ b/Redcraft.Utility/Source/Public/Containers/Containers.h @@ -1,7 +1,6 @@ #pragma once #include "CoreTypes.h" -#include "Containers/Iterator.h" #include "Containers/Array.h" #include "Containers/StaticArray.h" #include "Containers/ArrayView.h" diff --git a/Redcraft.Utility/Source/Public/Containers/List.h b/Redcraft.Utility/Source/Public/Containers/List.h index d8a823f..4425b01 100644 --- a/Redcraft.Utility/Source/Public/Containers/List.h +++ b/Redcraft.Utility/Source/Public/Containers/List.h @@ -4,11 +4,11 @@ #include "Memory/Allocator.h" #include "Templates/Utility.h" #include "Templates/TypeHash.h" -#include "Templates/Container.h" -#include "Containers/Iterator.h" #include "TypeTraits/TypeTraits.h" #include "Miscellaneous/Compare.h" #include "Memory/MemoryOperator.h" +#include "Miscellaneous/Iterator.h" +#include "Miscellaneous/Container.h" #include "Miscellaneous/AssertionMacros.h" #include "Miscellaneous/ConstantIterator.h" diff --git a/Redcraft.Utility/Source/Public/Containers/StaticArray.h b/Redcraft.Utility/Source/Public/Containers/StaticArray.h index b0aa477..7b730ba 100644 --- a/Redcraft.Utility/Source/Public/Containers/StaticArray.h +++ b/Redcraft.Utility/Source/Public/Containers/StaticArray.h @@ -4,10 +4,10 @@ #include "Templates/Meta.h" #include "Templates/Utility.h" #include "Templates/TypeHash.h" -#include "Templates/Container.h" -#include "Containers/Iterator.h" #include "TypeTraits/TypeTraits.h" #include "Miscellaneous/Compare.h" +#include "Miscellaneous/Iterator.h" +#include "Miscellaneous/Container.h" #include "Miscellaneous/AssertionMacros.h" NAMESPACE_REDCRAFT_BEGIN diff --git a/Redcraft.Utility/Source/Public/Containers/StaticBitset.h b/Redcraft.Utility/Source/Public/Containers/StaticBitset.h index 2c709d5..137eecf 100644 --- a/Redcraft.Utility/Source/Public/Containers/StaticBitset.h +++ b/Redcraft.Utility/Source/Public/Containers/StaticBitset.h @@ -3,12 +3,12 @@ #include "CoreTypes.h" #include "Templates/Utility.h" #include "Templates/TypeHash.h" -#include "Templates/Container.h" -#include "Containers/Iterator.h" #include "Templates/Noncopyable.h" #include "TypeTraits/TypeTraits.h" #include "Miscellaneous/Compare.h" #include "Memory/MemoryOperator.h" +#include "Miscellaneous/Iterator.h" +#include "Miscellaneous/Container.h" #include "Miscellaneous/AssertionMacros.h" NAMESPACE_REDCRAFT_BEGIN diff --git a/Redcraft.Utility/Source/Public/Miscellaneous/ConstantIterator.h b/Redcraft.Utility/Source/Public/Miscellaneous/ConstantIterator.h index 4cd9b2b..4d6bed3 100644 --- a/Redcraft.Utility/Source/Public/Miscellaneous/ConstantIterator.h +++ b/Redcraft.Utility/Source/Public/Miscellaneous/ConstantIterator.h @@ -3,7 +3,7 @@ #include "CoreTypes.h" #include "Memory/Address.h" #include "Templates/Utility.h" -#include "Containers/Iterator.h" +#include "Miscellaneous/Iterator.h" #include "Miscellaneous/Compare.h" #include "TypeTraits/TypeTraits.h" diff --git a/Redcraft.Utility/Source/Public/Templates/Container.h b/Redcraft.Utility/Source/Public/Miscellaneous/Container.h similarity index 100% rename from Redcraft.Utility/Source/Public/Templates/Container.h rename to Redcraft.Utility/Source/Public/Miscellaneous/Container.h diff --git a/Redcraft.Utility/Source/Public/Containers/Iterator.h b/Redcraft.Utility/Source/Public/Miscellaneous/Iterator.h similarity index 100% rename from Redcraft.Utility/Source/Public/Containers/Iterator.h rename to Redcraft.Utility/Source/Public/Miscellaneous/Iterator.h diff --git a/Redcraft.Utility/Source/Public/String/String.h b/Redcraft.Utility/Source/Public/String/String.h index be96c2b..6330833 100644 --- a/Redcraft.Utility/Source/Public/String/String.h +++ b/Redcraft.Utility/Source/Public/String/String.h @@ -6,10 +6,10 @@ #include "String/StringView.h" #include "Templates/Utility.h" #include "Templates/Optional.h" -#include "Templates/Container.h" -#include "Containers/Iterator.h" #include "TypeTraits/TypeTraits.h" #include "Templates/Noncopyable.h" +#include "Miscellaneous/Iterator.h" +#include "Miscellaneous/Container.h" #include "Miscellaneous/AssertionMacros.h" NAMESPACE_REDCRAFT_BEGIN diff --git a/Redcraft.Utility/Source/Public/String/StringView.h b/Redcraft.Utility/Source/Public/String/StringView.h index 76e7f34..5524e16 100644 --- a/Redcraft.Utility/Source/Public/String/StringView.h +++ b/Redcraft.Utility/Source/Public/String/StringView.h @@ -5,11 +5,11 @@ #include "Memory/Allocator.h" #include "Templates/Utility.h" #include "Templates/TypeHash.h" -#include "Templates/Container.h" -#include "Containers/Iterator.h" #include "Containers/ArrayView.h" #include "TypeTraits/TypeTraits.h" #include "Memory/MemoryOperator.h" +#include "Miscellaneous/Iterator.h" +#include "Miscellaneous/Container.h" #include "Miscellaneous/AssertionMacros.h" #include "Miscellaneous/ConstantIterator.h" diff --git a/Redcraft.Utility/Source/Public/Templates/Meta.h b/Redcraft.Utility/Source/Public/Templates/Meta.h index 8254d8b..2e9e4f7 100644 --- a/Redcraft.Utility/Source/Public/Templates/Meta.h +++ b/Redcraft.Utility/Source/Public/Templates/Meta.h @@ -2,15 +2,15 @@ #include "CoreTypes.h" #include "Templates/Utility.h" -#include "Templates/Container.h" #include "TypeTraits/TypeTraits.h" +#include "Miscellaneous/Container.h" NAMESPACE_REDCRAFT_BEGIN NAMESPACE_MODULE_BEGIN(Redcraft) NAMESPACE_MODULE_BEGIN(Utility) template -struct TIntegerSequence +struct TIntegerSequence { using ValueType = T; FORCEINLINE static constexpr size_t Num() { return sizeof...(Ints); } diff --git a/Redcraft.Utility/Source/Public/Templates/Templates.h b/Redcraft.Utility/Source/Public/Templates/Templates.h index 7318a61..978f9f3 100644 --- a/Redcraft.Utility/Source/Public/Templates/Templates.h +++ b/Redcraft.Utility/Source/Public/Templates/Templates.h @@ -2,7 +2,6 @@ #include "CoreTypes.h" #include "Templates/Utility.h" -#include "Templates/Container.h" #include "Templates/Noncopyable.h" #include "Templates/Invoke.h" #include "Templates/ReferenceWrapper.h"