Skip to content

Commit c6f3030

Browse files
committed
fix some warnings
1 parent 970f349 commit c6f3030

File tree

11 files changed

+68
-17
lines changed

11 files changed

+68
-17
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ if (MSVC)
6060
"/wd4464" # relative include path, in geode
6161
)
6262
else()
63-
target_compile_options(${PROJECT_NAME} PUBLIC "-Wall" "-Wextra" "-Wpedantic" "-Wno-dollar-in-identifier-extension")
63+
target_compile_options(
64+
${PROJECT_NAME} PUBLIC
65+
"-Wall" "-Wextra" "-Wpedantic"
66+
"-Wno-dollar-in-identifier-extension"
67+
)
6468
endif()
6569

6670
set_property(TARGET ${PROJECT_NAME} PROPERTY COMPILE_WARNING_AS_ERROR ON)

include/api/base.hpp

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

3+
#ifdef __clang__
4+
#pragma clang diagnostic push
5+
#pragma clang diagnostic ignored "-Wunused-parameter"
6+
#endif
7+
#include <Geode/loader/Dispatch.hpp>
8+
#ifdef __clang__
9+
#pragma clang diagnostic pop
10+
#endif
11+
12+
313
#define ICON_KIT_FILTER_AND_SORT_ID "nytelyte.icon_kit_filter_and_sort"
414

515
namespace nytelyte {

include/api/events.hpp

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

3+
#ifdef __clang__
4+
#pragma clang diagnostic push
5+
#pragma clang diagnostic ignored "-Wunused-parameter"
6+
#endif
37
#include <Geode/loader/Dispatch.hpp>
48
#include <Geode/loader/Mod.hpp>
9+
#ifdef __clang__
10+
#pragma clang diagnostic pop
11+
#endif
12+
513
#include <api/base.hpp>
614

715
namespace nytelyte {

include/hooks/GJGarageLayer.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22

33
#include <Geode/Geode.hpp>
44

5+
#ifdef _MSC_VER
56
#pragma warning(push)
67
#pragma warning(disable: 4265) // non-virtual destructor
8+
#endif
9+
710
#include <Geode/modify/GJGarageLayer.hpp>
11+
12+
#ifdef _MSC_VER
813
#pragma warning(pop)
14+
#endif
915

1016
using namespace geode::prelude;
1117

include/hooks/GameManager.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22

33
#include <Geode/Geode.hpp>
44

5+
#ifdef _MSC_VER
56
#pragma warning(push)
67
#pragma warning(disable: 4265) // non-virtual destructor
8+
#endif
9+
710
#include <Geode/modify/GameManager.hpp>
11+
12+
#ifdef _MSC_VER
813
#pragma warning(pop)
14+
#endif // MSVC
915

1016
using namespace geode::prelude;
1117

include/hooks/PurchaseItemPopup.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22

33
#include <Geode/Geode.hpp>
44

5+
#ifdef _MSC_VER
56
#pragma warning(push)
67
#pragma warning(disable: 4265) // non-virtual destructor
8+
#endif
9+
710
#include <Geode/modify/PurchaseItemPopup.hpp>
11+
12+
#ifdef _MSC_VER
813
#pragma warning(pop)
14+
#endif // MSVC
915

1016
#include <iconkit.hpp>
1117
#include <logic.hpp>

include/moreicons.hpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#ifdef _MSC_VER
2+
#pragma warning(push)
3+
#pragma warning(disable: 4061) // enum exhaustiveness
4+
#endif
5+
6+
#ifdef __clang__
7+
#pragma clang diagnostic push
8+
#pragma clang diagnostic ignored "-Wunused-parameter"
9+
#pragma clang diagnostic ignored "-Wsign-compare"
10+
#endif
11+
12+
#include <hiimjustin000.more_icons/include/MoreIcons.hpp>
13+
14+
#ifdef _MSC_VER
15+
#pragma warning(pop)
16+
#endif
17+
18+
#ifdef __clang__
19+
#pragma clang diagnostic pop
20+
#endif

src/api/api.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
#include <api/api.hpp>
22
#include <logic.hpp>
33
#include <iconkit.hpp>
4-
5-
#pragma warning(push)
6-
#pragma warning(disable: 4061) // enum exhaustiveness
7-
#include <hiimjustin000.more_icons/include/MoreIcons.hpp>
8-
#pragma warning(pop)
9-
4+
#include <moreicons.hpp>
105

116

127
using namespace nytelyte::icon_kit_filter_and_sort;

src/hooks/GJGarageLayer.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
#include <popups/DisplayOptionsPopup.hpp>
1212
#include <popups/FilterAndSortPopup.hpp>
1313

14-
#pragma warning(push)
15-
#pragma warning(disable: 4061) // enum exhaustiveness
16-
#include <hiimjustin000.more_icons/include/MoreIcons.hpp>
17-
#pragma warning(pop)
14+
#include <moreicons.hpp>
1815

1916
using namespace geode::prelude;
2017

@@ -182,7 +179,6 @@ void HookedGJGarageLayer::recalculateNavdotMenu(int currentPage, IconType iconTy
182179

183180
m_navDotMenu->removeAllChildren();
184181
m_pageButtons->removeAllObjects();
185-
CCSize winSize = CCDirector::sharedDirector()->getWinSize();
186182
// set the gap to 0, and then manually set every per-element gap to 6.f
187183
// axis layout doesn't let you specifically set a cross axis gap because fuck you
188184
// it just uses the layout gap regardless, i think it even ignores the per-element prev/next gap

src/logic.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
#include <constants.hpp>
44
#include <logic.hpp>
55
#include <iconkit.hpp>
6-
#pragma warning(push)
7-
#pragma warning(disable: 4061) // enum exhaustiveness
8-
#include <hiimjustin000.more_icons/include/MoreIcons.hpp>
9-
#pragma warning(pop)
6+
#include <moreicons.hpp>
107

118

129
using namespace geode::prelude;

0 commit comments

Comments
 (0)