[nostalgia/geo] GCC 12 fix

This commit is contained in:
2022-05-25 21:18:05 -05:00
parent 729cde5bf9
commit a9d5272176
3 changed files with 5 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
* Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#include <algorithm>
#include <filesystem>
#include <ox/std/std.hpp>

View File

@@ -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.");
}