Skip to content

Commit 4272a99

Browse files
committed
Fix some bool-to-int warnings from MSVC. NFC.
1 parent 0ff6a6f commit 4272a99

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

hyper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2547,7 +2547,7 @@ cell *createMovR(cell *c, int d);
25472547

25482548
bool ishept(cell *c);
25492549
int cdist50(cell *c);
2550-
int polarb50(cell *c);
2550+
bool polarb50(cell *c);
25512551

25522552
bool isGravityLand(eLand l);
25532553
bool isWarped(eLand l);
@@ -2771,7 +2771,7 @@ void sdltogl(SDL_Surface *txt, struct glfont_t& f, int ch);
27712771
void showStartMenu();
27722772

27732773
bool polara50(int x);
2774-
int polara50(cell *c);
2774+
bool polara50(cell *c);
27752775
int fiftyval049(cell *c);
27762776

27772777
namespace fieldpattern {

pattern2.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,19 +131,19 @@ int land50(cell *c) {
131131
}
132132
}
133133

134-
int polara50(cell *c) {
135-
if(sphere || euclid || S7>7 || S6>6) return 0;
134+
bool polara50(cell *c) {
135+
if(sphere || euclid || S7>7 || S6>6) return false;
136136
else if(gp::on || irr::on) return polara50(fiftyval(c->master->c7));
137137
else if(ctof(c)) return polara50(fiftyval(c));
138138
else {
139139
auto ar = gp::get_masters(c);
140140
for(int i=0; i<3; i++)
141141
if(cdist50(ar[i]->fiftyval) < 3) return polara50(ar[i]->fiftyval);
142-
return 0;
142+
return false;
143143
}
144144
}
145145

146-
int polarb50(cell *c) {
146+
bool polarb50(cell *c) {
147147
if(euclid) return true;
148148
if(sphere || euclid || S7>7 || S6>6) return true;
149149
else if(gp::on || irr::on) return polarb50(fiftyval(c->master->c7));
@@ -152,7 +152,7 @@ int polarb50(cell *c) {
152152
auto ar = gp::get_masters(c);
153153
for(int i=0; i<3; i++)
154154
if(cdist50(ar[i]->fiftyval) < 3) return polarb50(ar[i]->fiftyval);
155-
return 0;
155+
return false;
156156
}
157157
}
158158

@@ -182,7 +182,7 @@ int fiftyval049(cell *c) {
182182
else if(sphere) return 0;
183183
else {
184184
int a[3], qa=0;
185-
int pa = polara50(c), pb = polarb50(c);
185+
bool pa = polara50(c), pb = polarb50(c);
186186
auto ar = gp::get_masters(c);
187187
for(int i=0; i<3; i++)
188188
if(polara50(ar[i]->fiftyval) == pa && polarb50(ar[i]->fiftyval) == pb)
@@ -1931,7 +1931,7 @@ namespace linepatterns {
19311931
break;
19321932

19331933
case patPalace: {
1934-
int a = polarb50(c);
1934+
bool a = polarb50(c);
19351935
if(pseudohept(c)) for(int i=0; i<7; i++) {
19361936
cell *c1 = createMov(c, (i+3) % 7);
19371937
cell *c2 = createMov(c, (i+4) % 7);

0 commit comments

Comments
 (0)