Skip to content

Commit b58edb0

Browse files
committed
add api, remove unnecessary constants, handle warnings better
1 parent c6f3030 commit b58edb0

File tree

15 files changed

+12
-262
lines changed

15 files changed

+12
-262
lines changed

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,12 @@ if (MSVC)
5050
"/Wall"
5151
"/wd4820" # padding inserted
5252
"/wd4710" # function not inlined
53-
#"/wd4265" # non-virtual destructor
5453
"/wd5045" # disable spectre mitigation warning
5554
# implicitly marked as deleted
5655
"/wd4625"
5756
"/wd5026"
5857
"/wd4626"
5958
"/wd5027"
60-
"/wd4464" # relative include path, in geode
6159
)
6260
else()
6361
target_compile_options(

include/api/api.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#pragma once
22

33
#include <Geode/loader/Mod.hpp>
4-
#include <api/base.hpp>
5-
#include <api/events.hpp>
4+
5+
#include "base.hpp"
6+
#include "events.hpp"
67

78
// declaration and documentation
89
namespace nytelyte {

include/api/base.hpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
#pragma once
22

3-
#ifdef __clang__
4-
#pragma clang diagnostic push
5-
#pragma clang diagnostic ignored "-Wunused-parameter"
6-
#endif
73
#include <Geode/loader/Dispatch.hpp>
8-
#ifdef __clang__
9-
#pragma clang diagnostic pop
10-
#endif
11-
124

135
#define ICON_KIT_FILTER_AND_SORT_ID "nytelyte.icon_kit_filter_and_sort"
146

include/api/events.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#pragma once
22

3+
/*
34
#ifdef __clang__
45
#pragma clang diagnostic push
56
#pragma clang diagnostic ignored "-Wunused-parameter"
@@ -9,6 +10,7 @@
910
#ifdef __clang__
1011
#pragma clang diagnostic pop
1112
#endif
13+
*/
1214

1315
#include <api/base.hpp>
1416

include/constants.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ enum SortType { Number, LockStatus, Category, Author };
1919
const SortType DEFAULT_SORT_TYPES[SORT_TYPE_COUNT] = { SortType::Number, SortType::LockStatus, SortType::Category, SortType::Author };
2020
const bool DEFAULT_SORT_REVERSES[SORT_TYPE_COUNT] = { false, false, false, false };
2121

22-
enum PathType { Fire = 1, Ice, Poison, Shadow, Lava, Earth, Blood, Metal, Light, Souls };
2322
extern std::unordered_map<SortType, std::string> SORT_TYPE_NAMES;
2423

2524
extern std::unordered_map<UnlockType, int> VANILLA_MAX_ICONS;
@@ -30,10 +29,6 @@ extern std::vector<UnlockType> UNLOCK_TYPES_TO_CHANGE;
3029
#define SHOULD_CHANGE_ICON_TYPE(iconType) (std::find(ICON_TYPES_TO_CHANGE.begin(), ICON_TYPES_TO_CHANGE.end(), iconType) != ICON_TYPES_TO_CHANGE.end())
3130
#define SHOULD_CHANGE_UNLOCK_TYPE(unlockType) (std::find(UNLOCK_TYPES_TO_CHANGE.begin(), UNLOCK_TYPES_TO_CHANGE.end(), unlockType) != UNLOCK_TYPES_TO_CHANGE.end())
3231
extern std::unordered_map<UnlockType, std::string> ICON_NAMES;
33-
extern std::unordered_map<UnlockType, std::vector<int>> SPECIAL_UNLOCK_ORDER;
34-
extern std::vector<std::pair<int, UnlockType>> SHARDS_OF_POWER_UNLOCK_ORDER;
35-
extern std::unordered_map<PathType, std::vector<std::pair<int, UnlockType>>> PATHS_UNLOCK_ORDER;
36-
3732

3833
const float VERTICAL_BORDER_SIZE = 5.f;
3934
const float HORIZONTAL_BORDER_SIZE = 3.25f;

include/hooks/GJGarageLayer.hpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
#pragma once
22

33
#include <Geode/Geode.hpp>
4-
5-
#ifdef _MSC_VER
6-
#pragma warning(push)
7-
#pragma warning(disable: 4265) // non-virtual destructor
8-
#endif
9-
104
#include <Geode/modify/GJGarageLayer.hpp>
115

12-
#ifdef _MSC_VER
13-
#pragma warning(pop)
14-
#endif
15-
166
using namespace geode::prelude;
177

188
struct HookedGJGarageLayer : Modify<HookedGJGarageLayer, GJGarageLayer> {

include/hooks/GameManager.hpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
#pragma once
22

33
#include <Geode/Geode.hpp>
4-
5-
#ifdef _MSC_VER
6-
#pragma warning(push)
7-
#pragma warning(disable: 4265) // non-virtual destructor
8-
#endif
9-
104
#include <Geode/modify/GameManager.hpp>
115

12-
#ifdef _MSC_VER
13-
#pragma warning(pop)
14-
#endif // MSVC
15-
166
using namespace geode::prelude;
177

188
struct HookedGameManager : Modify<HookedGameManager, GameManager> {

include/hooks/PurchaseItemPopup.hpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
#pragma once
22

33
#include <Geode/Geode.hpp>
4-
5-
#ifdef _MSC_VER
6-
#pragma warning(push)
7-
#pragma warning(disable: 4265) // non-virtual destructor
8-
#endif
9-
104
#include <Geode/modify/PurchaseItemPopup.hpp>
115

12-
#ifdef _MSC_VER
13-
#pragma warning(pop)
14-
#endif // MSVC
15-
166
#include <iconkit.hpp>
177
#include <logic.hpp>
188

include/moreicons.hpp

Lines changed: 0 additions & 20 deletions
This file was deleted.

mod.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
{"id": "geode.node-ids", "version": ">=v1.2.0", "importance": "required"},
1111
{"id": "hiimjustin000.more_icons", "version": ">=v1.14.6", "importance": "suggested"}
1212
],
13+
"api": {"include": ["include/api/*.hpp"]},
1314
"repository": "https://github.com/nytelytee/geode-icon-kit-filter-and-sort.git",
1415
"resources": {
1516
"spritesheets": {

0 commit comments

Comments
 (0)