header fixes (i think this might make compiling without PCH possible?)

This commit is contained in:
HJfod 2024-11-10 11:51:49 +02:00
parent be9ba27ba4
commit 9d4e6ba0e4
8 changed files with 12 additions and 5 deletions

View file

@ -10,5 +10,5 @@
#include "utils/file.hpp" #include "utils/file.hpp"
#include "utils/permission.hpp" #include "utils/permission.hpp"
#include "utils/general.hpp" #include "utils/general.hpp"
#include "utils/timer.hpp" #include "utils/Timer.hpp"
#include "utils/ObjcHook.hpp" #include "utils/ObjcHook.hpp"

View file

@ -2,6 +2,7 @@
#include <Geode/platform/platform.hpp> #include <Geode/platform/platform.hpp>
#include <tulip/TulipHook.hpp> #include <tulip/TulipHook.hpp>
#include "../Prelude.hpp"
namespace geode::hook { namespace geode::hook {
/** /**

View file

@ -5,6 +5,7 @@
#include <matjson.hpp> #include <matjson.hpp>
#include <tuple> #include <tuple>
#include <Geode/Result.hpp> #include <Geode/Result.hpp>
#include <fmt/format.h>
namespace geode { namespace geode {
enum class VersionCompare { enum class VersionCompare {
@ -256,8 +257,7 @@ namespace geode {
template <class V> template <class V>
requires std::is_same_v<V, geode::VersionInfo> || std::is_same_v<V, geode::ComparableVersionInfo> requires std::is_same_v<V, geode::VersionInfo> || std::is_same_v<V, geode::ComparableVersionInfo>
struct matjson::Serialize<V> { struct matjson::Serialize<V> {
static geode::Result<V, std::string> fromJson(Value const& value) static geode::Result<V, std::string> fromJson(Value const& value) {
{
GEODE_UNWRAP_INTO(auto str, value.asString()); GEODE_UNWRAP_INTO(auto str, value.asString());
GEODE_UNWRAP_INTO(auto version, V::parse(str).mapErr([](auto&& err) { GEODE_UNWRAP_INTO(auto version, V::parse(str).mapErr([](auto&& err) {
return fmt::format("Invalid version format: {}", err); return fmt::format("Invalid version format: {}", err);
@ -265,8 +265,7 @@ struct matjson::Serialize<V> {
return geode::Ok(version); return geode::Ok(version);
} }
static Value toJson(V const& value) static Value toJson(V const& value) {
{
return Value(value.toString()); return Value(value.toString());
} }
}; };

View file

@ -10,6 +10,8 @@
#include "../loader/Event.hpp" #include "../loader/Event.hpp"
#include <Geode/binding/CCMenuItemSpriteExtra.hpp> #include <Geode/binding/CCMenuItemSpriteExtra.hpp>
#include <Geode/binding/CCMenuItemToggler.hpp> #include <Geode/binding/CCMenuItemToggler.hpp>
#include "../ui/Layout.hpp"
#include "../ui/SpacerNode.hpp"
// support converting ccColor3B / ccColor4B to / from json // support converting ccColor3B / ccColor4B to / from json

View file

@ -4,6 +4,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <compare> #include <compare>
#include "../DefaultInclude.hpp"
namespace geode::utils::string { namespace geode::utils::string {
/** /**

View file

@ -1,3 +1,4 @@
#include <Geode/loader/Mod.hpp>
#include <Geode/loader/Setting.hpp> #include <Geode/loader/Setting.hpp>
#include <Geode/loader/ModSettingsManager.hpp> #include <Geode/loader/ModSettingsManager.hpp>
#include <Geode/utils/ranges.hpp> #include <Geode/utils/ranges.hpp>
@ -6,6 +7,7 @@
#include <Geode/utils/JsonValidation.hpp> #include <Geode/utils/JsonValidation.hpp>
#include <regex> #include <regex>
#include "SettingNodeV3.hpp" #include "SettingNodeV3.hpp"
#include <matjson/std.hpp>
using namespace geode::prelude; using namespace geode::prelude;

View file

@ -1,4 +1,5 @@
#include "ConfirmInstall.hpp" #include "ConfirmInstall.hpp"
#include <Geode/loader/Mod.hpp>
#include <Geode/utils/ranges.hpp> #include <Geode/utils/ranges.hpp>
#include <Geode/ui/Popup.hpp> #include <Geode/ui/Popup.hpp>
#include <server/DownloadManager.hpp> #include <server/DownloadManager.hpp>

View file

@ -1,5 +1,6 @@
#include <Geode/ui/SceneManager.hpp> #include <Geode/ui/SceneManager.hpp>
#include <Geode/utils/cocos.hpp> #include <Geode/utils/cocos.hpp>
#include <Geode/utils/ranges.hpp>
using namespace geode::prelude; using namespace geode::prelude;