Apply clang-format to code base

This commit is contained in:
clang-format-bot 2022-09-22 21:26:05 +03:00 committed by ζeh Matt
parent f37d0be806
commit ddb0522bbf
No known key found for this signature in database
GPG key ID: 18CE582C71A225B0
2199 changed files with 118692 additions and 114392 deletions

View file

@ -12,11 +12,7 @@ namespace Misc
inline Iterator forEachUnique(Iterator begin, Iterator end, BinaryPredicate predicate, Function function)
{
static_assert(
std::is_base_of_v<
std::forward_iterator_tag,
typename std::iterator_traits<Iterator>::iterator_category
>
);
std::is_base_of_v<std::forward_iterator_tag, typename std::iterator_traits<Iterator>::iterator_category>);
if (begin == end)
return begin;
function(*begin);
@ -35,20 +31,20 @@ namespace Misc
}
/// Performs a binary search on a sorted container for a string that 'key' starts with
template<typename Iterator, typename T>
template <typename Iterator, typename T>
static Iterator partialBinarySearch(Iterator begin, Iterator end, const T& key)
{
const Iterator notFound = end;
while(begin < end)
while (begin < end)
{
const Iterator middle = begin + (std::distance(begin, end) / 2);
int comp = Misc::StringUtils::ciCompareLen((*middle), key, (*middle).size());
if(comp == 0)
if (comp == 0)
return middle;
else if(comp > 0)
else if (comp > 0)
end = middle;
else
begin = middle + 1;