[nostalgia/geo] GCC 12 fix
This commit is contained in:
parent
729cde5bf9
commit
a9d5272176
@ -32,7 +32,7 @@ struct Vec {
|
||||
T y = 0;
|
||||
|
||||
template<typename RefType = value_type&, typename PtrType = value_type*, bool reverse = false>
|
||||
struct iterator: public std::iterator<std::bidirectional_iterator_tag, value_type> {
|
||||
struct iterator: public ox::Iterator<std::bidirectional_iterator_tag, value_type> {
|
||||
private:
|
||||
PtrType m_t = nullptr;
|
||||
size_type m_offset = 0;
|
||||
@ -60,7 +60,7 @@ struct Vec {
|
||||
}
|
||||
}
|
||||
|
||||
constexpr typename std::iterator<std::bidirectional_iterator_tag, value_type>::difference_type
|
||||
constexpr typename ox::Iterator<std::bidirectional_iterator_tag, value_type>::difference_type
|
||||
operator-(const iterator &other) const noexcept {
|
||||
if constexpr(reverse) {
|
||||
return m_offset + other.m_offset;
|
||||
|
@ -2,6 +2,7 @@
|
||||
* Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <filesystem>
|
||||
|
||||
#include <ox/std/std.hpp>
|
||||
|
@ -27,8 +27,8 @@ enum class ProjectEvent {
|
||||
};
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr ox::Result<ox::String> fileExt(auto path) noexcept {
|
||||
const auto extStart = std::find(path.crbegin(), path.crend(), '.').offset();
|
||||
constexpr ox::Result<ox::String> fileExt(const ox::String &path) noexcept {
|
||||
const auto extStart = ox::find(path.crbegin(), path.crend(), '.').offset();
|
||||
if (!extStart) {
|
||||
return OxError(1, "Cannot open a file without valid extension.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user