mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
Fix or suppress a bunch of Clang warnings. NFCI.
This commit is contained in:
parent
a727fd29a2
commit
db762ff21a
2
Makefile
2
Makefile
@ -83,7 +83,7 @@ ifeq (${TOOLCHAIN},clang)
|
||||
CXXFLAGS_STD = -std=c++11
|
||||
CXXFLAGS_EARLY += -march=native -fPIC
|
||||
CXXFLAGS_EARLY += -W -Wall -Wextra -Werror -pedantic
|
||||
CXXFLAGS_EARLY += -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-maybe-uninitialized -Wno-unknown-warning-option
|
||||
CXXFLAGS_EARLY += -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-maybe-uninitialized -Wno-unknown-warning-option -Wno-overloaded-virtual
|
||||
endif
|
||||
|
||||
ifeq (${TOOLCHAIN},gcc)
|
||||
|
2
kite.cpp
2
kite.cpp
@ -339,7 +339,7 @@ struct hrmap_kite : hrmap {
|
||||
return gm * where;
|
||||
}
|
||||
|
||||
virtual int wall_offset(cell *c) {
|
||||
int wall_offset(cell *c) override {
|
||||
if(WDIM == 3)
|
||||
return kite::getshape(c->master) == kite::pKite ? 10 : 0;
|
||||
else
|
||||
|
@ -664,10 +664,10 @@ EX namespace patterns {
|
||||
si.reflect = false;
|
||||
}
|
||||
else {
|
||||
int ids = 0, tids = 0, td = 0;
|
||||
int ids = 0, td = 0;
|
||||
for(int i=0; i<S3; i++) {
|
||||
int d = c->move(2*i)->master->fieldval;
|
||||
ids |= (1<<d); tids += d;
|
||||
ids |= (1<<d);
|
||||
}
|
||||
for(int i=0; i<S3; i++) {
|
||||
int d = c->move(2*i)->master->fieldval;
|
||||
|
22
reg3.cpp
22
reg3.cpp
@ -649,7 +649,7 @@ EX namespace reg3 {
|
||||
int h_id;
|
||||
/** transition matrix to that heptagon */
|
||||
transmatrix T;
|
||||
/** the sequence of moves we need to make to get there */;
|
||||
/** the sequence of moves we need to make to get there */
|
||||
vector<int> move_sequence;
|
||||
};
|
||||
|
||||
@ -680,7 +680,7 @@ EX namespace reg3 {
|
||||
return cgi.subshapes[id].vertices_only_local;
|
||||
}
|
||||
|
||||
transmatrix master_relative(cell *c, bool get_inverse) {
|
||||
transmatrix master_relative(cell *c, bool get_inverse) override {
|
||||
int id = local_id.at(c).second;
|
||||
auto& ss = cgi.subshapes[id];
|
||||
return get_inverse ? ss.from_cellcenter : ss.to_cellcenter;
|
||||
@ -689,11 +689,11 @@ EX namespace reg3 {
|
||||
void make_subconnections();
|
||||
|
||||
int wall_offset(cell *c) override;
|
||||
int shvid(cell *c) { return local_id.at(c).second; }
|
||||
int shvid(cell *c) override { return local_id.at(c).second; }
|
||||
|
||||
virtual transmatrix ray_iadj(cell *c, int i) override;
|
||||
transmatrix ray_iadj(cell *c, int i) override;
|
||||
|
||||
const vector<bool>& adjacent_dirs(cell *c, int i) {
|
||||
const vector<bool>& adjacent_dirs(cell *c, int i) override {
|
||||
int id = local_id.at(c).second;
|
||||
return cgi.subshapes[id].dirs_adjacent[i];
|
||||
}
|
||||
@ -1490,7 +1490,7 @@ EX namespace reg3 {
|
||||
return cgi.vertices_only;
|
||||
}
|
||||
|
||||
const vector<bool>& adjacent_dirs(cell *c, int i) {
|
||||
const vector<bool>& adjacent_dirs(cell *c, int i) override {
|
||||
return cgi.dirs_adjacent[i];
|
||||
}
|
||||
|
||||
@ -1582,7 +1582,7 @@ EX namespace reg3 {
|
||||
clearfrom(allh[0]);
|
||||
}
|
||||
|
||||
virtual struct transmatrix relative_matrix(heptagon *h2, heptagon *h1, const hyperpoint& hint) override {
|
||||
struct transmatrix relative_matrix(heptagon *h2, heptagon *h1, const hyperpoint& hint) override {
|
||||
return iso_inverse(locations[h1->fieldval]) * locations[h2->fieldval];
|
||||
}
|
||||
|
||||
@ -1901,13 +1901,13 @@ EX namespace reg3 {
|
||||
return relative_matrix_via_masters(c2, c1, hint);
|
||||
}
|
||||
|
||||
transmatrix master_relative(cell *c, bool get_inverse) {
|
||||
transmatrix master_relative(cell *c, bool get_inverse) override {
|
||||
if(PURE) return Id;
|
||||
int aid = cell_id.at(c);
|
||||
return quotient_map->master_relative(quotient_map->acells[aid], get_inverse);
|
||||
}
|
||||
|
||||
int shvid(cell *c) {
|
||||
int shvid(cell *c) override {
|
||||
if(PURE) return 0;
|
||||
if(!cell_id.count(c)) return quotient_map->shvid(c);
|
||||
int aid = cell_id.at(c);
|
||||
@ -1963,14 +1963,14 @@ EX namespace reg3 {
|
||||
c->c.connect(d, c1, ac->c.spin(d), false);
|
||||
}
|
||||
|
||||
virtual transmatrix ray_iadj(cell *c, int i) {
|
||||
transmatrix ray_iadj(cell *c, int i) override {
|
||||
if(PURE) return iadj(c, i);
|
||||
if(!cell_id.count(c)) return quotient_map->ray_iadj(c, i); /* necessary because ray samples are from quotient_map */
|
||||
int aid = cell_id.at(c);
|
||||
return quotient_map->ray_iadj(quotient_map->acells[aid], i);
|
||||
}
|
||||
|
||||
const vector<bool>& adjacent_dirs(cell *c, int i) {
|
||||
const vector<bool>& adjacent_dirs(cell *c, int i) override {
|
||||
if(PURE) return cgi.dirs_adjacent[i];
|
||||
int aid = cell_id.at(c);
|
||||
return quotient_map->adjacent_dirs(quotient_map->acells[aid], i);
|
||||
|
@ -139,14 +139,14 @@ struct hrmap_spherical : hrmap_standard {
|
||||
#endif
|
||||
}
|
||||
|
||||
heptagon *getOrigin() { return dodecahedron[0]; }
|
||||
heptagon *getOrigin() override { return dodecahedron[0]; }
|
||||
|
||||
~hrmap_spherical() {
|
||||
for(int i=0; i<spherecells(); i++) clearHexes(dodecahedron[i]);
|
||||
for(int i=0; i<spherecells(); i++) tailored_delete(dodecahedron[i]);
|
||||
}
|
||||
|
||||
void verify() {
|
||||
void verify() override {
|
||||
for(int i=0; i<spherecells(); i++) for(int k=0; k<S7; k++) {
|
||||
heptspin hs(dodecahedron[i], k, false);
|
||||
heptspin hs2 = hs + wstep + (S7-1) + wstep + (S7-1) + wstep + (S7-1);
|
||||
@ -172,7 +172,7 @@ struct hrmap_spherical : hrmap_standard {
|
||||
return Id;
|
||||
}
|
||||
|
||||
transmatrix relative_matrix(cell *c2, cell *c1, const hyperpoint& hint) {
|
||||
transmatrix relative_matrix(cell *c2, cell *c1, const hyperpoint& hint) override {
|
||||
transmatrix T = iso_inverse(get_where(c1)) * get_where(c2);
|
||||
if(elliptic) fixelliptic(T);
|
||||
return T;
|
||||
|
Loading…
Reference in New Issue
Block a user