Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Aug 24, 2023
1 parent 70af7d6 commit a663d84
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions src/hooks/GameLevelManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ class $modify(GameLevelManager) {
case CompleteMode::percentage:
if((percentageMin == 0 || currentLvl->m_normalPercent >= percentageMin) && (percentageMax == 0 || currentLvl->m_normalPercent <= percentageMax)) pRet->addObject(currentLvl);
break;
default:
break;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/hooks/InfoLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class $modify(BIInfoLayer, InfoLayer) {

auto senderBtn = static_cast<CCMenuItemToggler*>(sender);

bool newState = !(reinterpret_cast<int>(senderBtn->getUserData()));
bool newState = !(reinterpret_cast<size_t>(senderBtn->getUserData()));
senderBtn->setUserData(reinterpret_cast<void*>(newState));

const char* text = "Live Comment Refresh: Enabled";
Expand Down
2 changes: 1 addition & 1 deletion src/layers/DailyCell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void DailyCell::loadFromLevel(GJGameLevel* level) {
percentSprite->setScale(0.35f);
this->m_mainLayer->addChild(percentSprite);

auto percent = CCLabelBMFont::create(CCString::createWithFormat("%i%%", level->m_normalPercent)->getCString(), "bigFont.fnt");
auto percent = CCLabelBMFont::create(CCString::createWithFormat("%i%%", level->m_normalPercent.value())->getCString(), "bigFont.fnt");
percent->setAnchorPoint({ 0.0f, 0.5f });
percent->setPosition(57.5f, 24.0f);
percent->setScale(.325f);
Expand Down
2 changes: 0 additions & 2 deletions src/layers/RewardCell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#include "../utils.hpp"

void RewardCell::loadFromReward(GJRewardItem* reward) {
this->level = level;

const float rowX = 48.f;
const float rowY = 10.5f;

Expand Down
3 changes: 1 addition & 2 deletions src/layers/RewardCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
using namespace geode::prelude;

class RewardCell : public TableViewCell {
GJGameLevel* level;
void draw() override;
void draw();

public:
RewardCell(const char* name, cocos2d::CCSize size);
Expand Down
2 changes: 1 addition & 1 deletion src/layers/RewardViewLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ class RewardViewLayer : public cocos2d::CCLayer {
static bool compareRewards(const void* l1, const void* l2);
static cocos2d::CCScene* scene(cocos2d::CCDictionary* chests, const char* title);
int getPage() const;
void keyDown(cocos2d::enumKeyCodes key) override;
void keyDown(cocos2d::enumKeyCodes key);
};
3 changes: 3 additions & 0 deletions src/managers/BetterInfoOnline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ void BetterInfoOnline::sendScoreToProfilePage(cocos2d::CCArray* scores, int acco
case IconType::Spider:
score->m_playerSpider = score->m_iconID;
break;
case IconType::DeathEffect:
case IconType::Special:
break;
}

m_scoreProfilePage->getUserInfoChanged(score);
Expand Down
6 changes: 3 additions & 3 deletions src/managers/BetterInfoStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class BetterInfoStats : public GManager {
bool init();
void migrateSaveData();
void migrationPopup(float dt);
void encodeDataTo(DS_Dictionary* data) override;
void dataLoaded(DS_Dictionary* data) override;
void firstLoad() override;
void encodeDataTo(DS_Dictionary* data);
void dataLoaded(DS_Dictionary* data);
void firstLoad();
static BetterInfoStats* sharedState(){
if(m_instance == nullptr){
m_instance = new BetterInfoStats;
Expand Down

0 comments on commit a663d84

Please sign in to comment.