Revert "core: Fix clang build"
This commit is contained in:
parent
fdd9154069
commit
3d592972dc
105 changed files with 667 additions and 906 deletions
|
@ -41,8 +41,8 @@ public:
|
|||
Fiber(const Fiber&) = delete;
|
||||
Fiber& operator=(const Fiber&) = delete;
|
||||
|
||||
Fiber(Fiber&&) = delete;
|
||||
Fiber& operator=(Fiber&&) = delete;
|
||||
Fiber(Fiber&&) = default;
|
||||
Fiber& operator=(Fiber&&) = default;
|
||||
|
||||
/// Yields control from Fiber 'from' to Fiber 'to'
|
||||
/// Fiber 'from' must be the currently running fiber.
|
||||
|
|
|
@ -189,8 +189,7 @@ template <typename T>
|
|||
return {};
|
||||
}
|
||||
last = std::min<std::size_t>(last, vector.size());
|
||||
return std::vector<T>(vector.begin() + static_cast<std::ptrdiff_t>(first),
|
||||
vector.begin() + static_cast<std::ptrdiff_t>(first + last));
|
||||
return std::vector<T>(vector.begin() + first, vector.begin() + first + last);
|
||||
}
|
||||
|
||||
enum class DirectorySeparator {
|
||||
|
|
|
@ -27,7 +27,7 @@ struct Rectangle {
|
|||
if constexpr (std::is_floating_point_v<T>) {
|
||||
return std::abs(right - left);
|
||||
} else {
|
||||
return static_cast<T>(std::abs(static_cast<std::make_signed_t<T>>(right - left)));
|
||||
return std::abs(static_cast<std::make_signed_t<T>>(right - left));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ struct Rectangle {
|
|||
if constexpr (std::is_floating_point_v<T>) {
|
||||
return std::abs(bottom - top);
|
||||
} else {
|
||||
return static_cast<T>(std::abs(static_cast<std::make_signed_t<T>>(bottom - top)));
|
||||
return std::abs(static_cast<std::make_signed_t<T>>(bottom - top));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -320,7 +320,7 @@ private:
|
|||
}
|
||||
|
||||
const auto begin_range = list.begin();
|
||||
const auto end_range = std::next(begin_range, static_cast<std::ptrdiff_t>(shift));
|
||||
const auto end_range = std::next(begin_range, shift);
|
||||
list.splice(list.end(), list, begin_range, end_range);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,14 +15,6 @@ namespace Common {
|
|||
*/
|
||||
class SpinLock {
|
||||
public:
|
||||
SpinLock() = default;
|
||||
|
||||
SpinLock(const SpinLock&) = delete;
|
||||
SpinLock& operator=(const SpinLock&) = delete;
|
||||
|
||||
SpinLock(SpinLock&&) = delete;
|
||||
SpinLock& operator=(SpinLock&&) = delete;
|
||||
|
||||
void lock();
|
||||
void unlock();
|
||||
[[nodiscard]] bool try_lock();
|
||||
|
|
|
@ -504,35 +504,35 @@ bool operator==(const S& p, const swap_struct_t<T, F> v) {
|
|||
template <typename T>
|
||||
struct swap_64_t {
|
||||
static T swap(T x) {
|
||||
return static_cast<T>(Common::swap64(static_cast<u64>(x)));
|
||||
return static_cast<T>(Common::swap64(x));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct swap_32_t {
|
||||
static T swap(T x) {
|
||||
return static_cast<T>(Common::swap32(static_cast<u32>(x)));
|
||||
return static_cast<T>(Common::swap32(x));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct swap_16_t {
|
||||
static T swap(T x) {
|
||||
return static_cast<T>(Common::swap16(static_cast<u16>(x)));
|
||||
return static_cast<T>(Common::swap16(x));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct swap_float_t {
|
||||
static T swap(T x) {
|
||||
return static_cast<T>(Common::swapf(static_cast<float>(x)));
|
||||
return static_cast<T>(Common::swapf(x));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct swap_double_t {
|
||||
static T swap(T x) {
|
||||
return static_cast<T>(Common::swapd(static_cast<double>(x)));
|
||||
return static_cast<T>(Common::swapd(x));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ struct ThreadQueueList {
|
|||
}
|
||||
}
|
||||
|
||||
return static_cast<Priority>(-1);
|
||||
return -1;
|
||||
}
|
||||
|
||||
[[nodiscard]] T get_first() const {
|
||||
|
@ -156,7 +156,7 @@ private:
|
|||
void link(Priority priority) {
|
||||
Queue* cur = &queues[priority];
|
||||
|
||||
for (auto i = static_cast<int>(priority - 1); i >= 0; --i) {
|
||||
for (int i = priority - 1; i >= 0; --i) {
|
||||
if (queues[i].next_nonempty != UnlinkedTag()) {
|
||||
cur->next_nonempty = queues[i].next_nonempty;
|
||||
queues[i].next_nonempty = cur;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue