refactor(Core/Misc): acore to Acore (#6043)

This commit is contained in:
Kitzunu
2021-05-31 14:21:54 +02:00
committed by GitHub
parent 7eeae6866e
commit 897a02bb75
224 changed files with 942 additions and 942 deletions

View File

@@ -16,7 +16,7 @@
#include <utility>
#include <vector>
namespace acore
namespace Acore
{
template<class T>
constexpr inline T* AddressOrSelf(T* ptr)
@@ -60,14 +60,14 @@ namespace acore
};
}
namespace acore::Containers
namespace Acore::Containers
{
// resizes <container> to have at most <requestedSize> elements
// if it has more than <requestedSize> elements, the elements to keep are selected randomly
template<class C>
void RandomResize(C& container, std::size_t requestedSize)
{
static_assert(std::is_base_of<std::forward_iterator_tag, typename std::iterator_traits<typename C::iterator>::iterator_category>::value, "Invalid container passed to acore::Containers::RandomResize");
static_assert(std::is_base_of<std::forward_iterator_tag, typename std::iterator_traits<typename C::iterator>::iterator_category>::value, "Invalid container passed to Acore::Containers::RandomResize");
if (std::size(container) <= requestedSize)
return;
@@ -176,7 +176,7 @@ namespace acore::Containers
}
/*
* @fn void acore::Containers::RandomShuffle(C& container)
* @fn void Acore::Containers::RandomShuffle(C& container)
*
* @brief Reorder the elements of the container randomly.
*