[ox] Fix GCC errors
This commit is contained in:
3
deps/ox/src/ox/std/error.hpp
vendored
3
deps/ox/src/ox/std/error.hpp
vendored
@@ -9,6 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "typetraits.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
#ifdef DEBUG
|
||||
#define OxError(x) ox::_error(__FILE__, __LINE__, x)
|
||||
@@ -59,7 +60,7 @@ struct ValErr {
|
||||
|
||||
inline constexpr ValErr() = default;
|
||||
|
||||
inline constexpr ValErr(T value, Error error = 0): value(value), error(error) {
|
||||
inline constexpr ValErr(T value, Error error = 0): value(ox::move(value)), error(error) {
|
||||
}
|
||||
|
||||
inline constexpr operator const T&() const {
|
||||
|
6
deps/ox/src/ox/std/hashmap.hpp
vendored
6
deps/ox/src/ox/std/hashmap.hpp
vendored
@@ -53,7 +53,7 @@ class HashMap {
|
||||
/**
|
||||
* K is assumed to be a null terminated string.
|
||||
*/
|
||||
static std::uint64_t hash(K, int len = 0xFFFF) noexcept;
|
||||
static uint64_t hash(K, int len = 0xFFFF) noexcept;
|
||||
|
||||
/**
|
||||
* K is assumed to be a null terminated string.
|
||||
@@ -126,8 +126,8 @@ void HashMap<K, T>::expand() {
|
||||
}
|
||||
|
||||
template<typename K, typename T>
|
||||
std::uint64_t HashMap<K, T>::hash(K k, int len) noexcept {
|
||||
std::uint64_t sum = 1;
|
||||
uint64_t HashMap<K, T>::hash(K k, int len) noexcept {
|
||||
uint64_t sum = 1;
|
||||
for (int i = 0; i < len && k[i]; i++) {
|
||||
sum += ((sum + k[i]) * 7) * sum;
|
||||
}
|
||||
|
Reference in New Issue
Block a user