mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-26 22:21:40 -04:00
Merge branch 'main' of https://github.com/zeldaret/tp
This commit is contained in:
@@ -73,6 +73,7 @@ ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last, const T
|
||||
return first;
|
||||
}
|
||||
|
||||
// should be inline, but breaks JStudio/JStudio/ctb weak function order
|
||||
template<class InputIt, class UnaryPredicate>
|
||||
InputIt find_if(InputIt first, InputIt last, UnaryPredicate p) {
|
||||
while (first != last && !p(*first)) {
|
||||
|
||||
@@ -28,10 +28,20 @@ template<> class __bitset_base<1> {
|
||||
public:
|
||||
__bitset_base() { data = 0; }
|
||||
|
||||
bool test(size_t pos) const { return data & (1 << pos); }
|
||||
bool test(size_t pos) const {
|
||||
u32 r31 = 1UL << pos;
|
||||
return data & r31;
|
||||
}
|
||||
bool any() const { return data != 0; }
|
||||
void set(size_t pos, bool val) { data |= (1 << pos); }
|
||||
void reset(size_t pos) { data &= ~(1 << pos); }
|
||||
void set(size_t pos, bool val) {
|
||||
u32 r31 = 1UL << pos;
|
||||
if (val) {
|
||||
data |= r31;
|
||||
} else {
|
||||
data &= ~r31;
|
||||
}
|
||||
}
|
||||
void reset(size_t pos) { data &= ~(1UL << pos); }
|
||||
private:
|
||||
size_t data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user