mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-01 02:19:15 +00:00
refactor(kernel): remove 'foreach' macro
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
@ -17,12 +17,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <convert.h>
|
||||
|
||||
namespace std
|
||||
{
|
||||
int strcmp(const char *lhs, const char *rhs)
|
||||
{
|
||||
for (; *lhs == *rhs && *lhs; lhs++, rhs++)
|
||||
;
|
||||
return *(unsigned char *)lhs - *(unsigned char *)rhs;
|
||||
}
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ namespace std
|
||||
|
||||
list(std::initializer_list<T> init, const Allocator &alloc = Allocator())
|
||||
{
|
||||
foreach (const_reference value in init)
|
||||
for (const_reference value : init)
|
||||
push_back(value);
|
||||
}
|
||||
|
||||
@ -250,7 +250,7 @@ namespace std
|
||||
list &operator=(std::initializer_list<T> ilist)
|
||||
{
|
||||
clear();
|
||||
foreach (const_reference value in ilist)
|
||||
for (const_reference value : ilist)
|
||||
push_back(value);
|
||||
return *this;
|
||||
}
|
||||
@ -273,7 +273,7 @@ namespace std
|
||||
void assign(std::initializer_list<T> ilist)
|
||||
{
|
||||
clear();
|
||||
foreach (const_reference value in ilist)
|
||||
for (const_reference value : ilist)
|
||||
push_back(value);
|
||||
}
|
||||
|
||||
@ -443,7 +443,7 @@ namespace std
|
||||
iterator insert(const_iterator pos, std::initializer_list<T> ilist)
|
||||
{
|
||||
iterator ret;
|
||||
foreach (const_reference value in ilist)
|
||||
for (const_reference value : ilist)
|
||||
ret = insert(pos, value);
|
||||
return ret;
|
||||
}
|
||||
|
@ -477,7 +477,7 @@ namespace std
|
||||
|
||||
void clear() noexcept
|
||||
{
|
||||
foreach (auto &bucket in buckets)
|
||||
for (auto &bucket : buckets)
|
||||
bucket.clear();
|
||||
elementsCount = 0;
|
||||
}
|
||||
@ -589,7 +589,7 @@ namespace std
|
||||
|
||||
void insert(std::initializer_list<value_type> ilist)
|
||||
{
|
||||
foreach (const auto &value in ilist)
|
||||
for (const auto &value : ilist)
|
||||
insert(value);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user