Skip to content

Commit

Permalink
header fixes (i think this might make compiling without PCH possible?)
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Nov 10, 2024
1 parent be9ba27 commit 9d4e6ba
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion loader/include/Geode/Utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
#include "utils/file.hpp"
#include "utils/permission.hpp"
#include "utils/general.hpp"
#include "utils/timer.hpp"
#include "utils/Timer.hpp"
#include "utils/ObjcHook.hpp"
1 change: 1 addition & 0 deletions loader/include/Geode/loader/Tulip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <Geode/platform/platform.hpp>
#include <tulip/TulipHook.hpp>
#include "../Prelude.hpp"

namespace geode::hook {
/**
Expand Down
7 changes: 3 additions & 4 deletions loader/include/Geode/utils/VersionInfo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <matjson.hpp>
#include <tuple>
#include <Geode/Result.hpp>
#include <fmt/format.h>

namespace geode {
enum class VersionCompare {
Expand Down Expand Up @@ -256,17 +257,15 @@ namespace geode {
template <class V>
requires std::is_same_v<V, geode::VersionInfo> || std::is_same_v<V, geode::ComparableVersionInfo>
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 version, V::parse(str).mapErr([](auto&& err) {
return fmt::format("Invalid version format: {}", err);
}));
return geode::Ok(version);
}

static Value toJson(V const& value)
{
static Value toJson(V const& value) {
return Value(value.toString());
}
};
2 changes: 2 additions & 0 deletions loader/include/Geode/utils/cocos.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include "../loader/Event.hpp"
#include <Geode/binding/CCMenuItemSpriteExtra.hpp>
#include <Geode/binding/CCMenuItemToggler.hpp>
#include "../ui/Layout.hpp"
#include "../ui/SpacerNode.hpp"

// support converting ccColor3B / ccColor4B to / from json

Expand Down
1 change: 1 addition & 0 deletions loader/include/Geode/utils/string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <string>
#include <vector>
#include <compare>
#include "../DefaultInclude.hpp"

namespace geode::utils::string {
/**
Expand Down
2 changes: 2 additions & 0 deletions loader/src/loader/SettingV3.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <Geode/loader/Mod.hpp>
#include <Geode/loader/Setting.hpp>
#include <Geode/loader/ModSettingsManager.hpp>
#include <Geode/utils/ranges.hpp>
Expand All @@ -6,6 +7,7 @@
#include <Geode/utils/JsonValidation.hpp>
#include <regex>
#include "SettingNodeV3.hpp"
#include <matjson/std.hpp>

using namespace geode::prelude;

Expand Down
1 change: 1 addition & 0 deletions loader/src/ui/mods/popups/ConfirmInstall.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "ConfirmInstall.hpp"
#include <Geode/loader/Mod.hpp>
#include <Geode/utils/ranges.hpp>
#include <Geode/ui/Popup.hpp>
#include <server/DownloadManager.hpp>
Expand Down
1 change: 1 addition & 0 deletions loader/src/ui/nodes/SceneManager.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <Geode/ui/SceneManager.hpp>
#include <Geode/utils/cocos.hpp>
#include <Geode/utils/ranges.hpp>

using namespace geode::prelude;

Expand Down

0 comments on commit 9d4e6ba

Please sign in to comment.