@@ -9,11 +9,11 @@ class $modify(AutoLevelRate, LevelInfoLayer) {
99 if (!LevelInfoLayer::init (level, challenge)) return false ;
1010
1111 // Make sure we haven't rated the level yet.
12- if (!m_starRateBtn) return ;
13- if (!m_starRateBtn->isEnabled ()) return ;
12+ if (!m_starRateBtn) return false ;
13+ if (!m_starRateBtn->isEnabled ()) return false ;
1414
1515 // Make sure the user has the feature enabled.
16- if (!Mod::get ()->getSettingValue <bool >(" enable-auto-rater" )) return ;
16+ if (!Mod::get ()->getSettingValue <bool >(" enable-auto-rater" )) return false ;
1717
1818 // Open the rate menu.
1919 m_starRateBtn->activate ();
@@ -34,15 +34,15 @@ class $modify(AutoLevelRate, LevelInfoLayer) {
3434
3535 if (!rateLayer) {
3636 log::warn (" RateStarsLayer could not be found!" );
37- return ;
37+ return false ;
3838 }
3939
4040 // We can just use the first object because it is the only object.
4141 auto mainLayer = static_cast <CCNode*>(rateLayer->getChildren ()->objectAtIndex (0 ));
4242
4343 if (!mainLayer) {
4444 log::warn (" Main Layer not found inside RateStarsLayer!" );
45- return ;
45+ return false ;
4646 }
4747
4848 CCMenu* menuLayer = nullptr ;
@@ -61,7 +61,7 @@ class $modify(AutoLevelRate, LevelInfoLayer) {
6161
6262 if (!menuLayer) {
6363 log::warn (" Main CCMenu Layer could not be found!" );
64- return ;
64+ return false ;
6565 }
6666
6767 CCMenuItemSpriteExtra* button;
@@ -130,7 +130,7 @@ class $modify(AutoLevelRate, LevelInfoLayer) {
130130 // Check if the difficulty selection button exists
131131 if (!button) {
132132 log::warn (" Difficulty selection button not found!" );
133- return ;
133+ return false ;
134134 }
135135
136136 button->activate ();
@@ -140,7 +140,7 @@ class $modify(AutoLevelRate, LevelInfoLayer) {
140140 // Check if the submit rating button exists
141141 if (!button) {
142142 log::warn (" Submit rating button not found!" );
143- return ;
143+ return false ;
144144 }
145145
146146 button->activate ();
@@ -166,15 +166,15 @@ class $modify(AutoLevelRate, LevelInfoLayer) {
166166
167167 if (!newRateLayer) {
168168 log::warn (" RateStarsLayer could not be found!" );
169- return ;
169+ return false ;
170170 }
171171
172172 // We can just use the first object because it is the only object.
173173 auto newMainLayer = static_cast <CCNode*>(newRateLayer->getChildren ()->objectAtIndex (0 ));
174174
175175 if (!newMainLayer) {
176176 log::warn (" Main Layer not found inside RateStarsLayer!" );
177- return ;
177+ return false ;
178178 }
179179
180180 CCMenu* newMenuLayer = nullptr ;
@@ -193,7 +193,7 @@ class $modify(AutoLevelRate, LevelInfoLayer) {
193193
194194 if (!newMenuLayer) {
195195 log::warn (" Main CCMenu Layer could not be found!" );
196- return ;
196+ return false ;
197197 }
198198
199199 CCMenuItemSpriteExtra* newButton;
@@ -248,7 +248,7 @@ class $modify(AutoLevelRate, LevelInfoLayer) {
248248 // Check if the difficulty selection button exists
249249 if (!newButton) {
250250 log::warn (" Difficulty selection button not found!" );
251- return ;
251+ return false ;
252252 }
253253
254254 newButton->activate ();
@@ -258,7 +258,7 @@ class $modify(AutoLevelRate, LevelInfoLayer) {
258258 // Check if the submit rating button exists
259259 if (!newButton) {
260260 log::warn (" Submit rating button not found!" );
261- return ;
261+ return false ;
262262 }
263263
264264 newButton->activate ();
0 commit comments