mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-12 21:27:41 +00:00
Fix more instances of Clang's -Wunqualified-std-cast-call
This commit is contained in:
@@ -1314,7 +1314,7 @@ EX void show() {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tested.coloring = col;
|
tested.coloring = col;
|
||||||
tilings.push_back(move(tested));
|
tilings.push_back(std::move(tested));
|
||||||
/* sort(tilings.begin(), tilings.end(), [] (archimedean_tiling& s1, archimedean_tiling& s2) {
|
/* sort(tilings.begin(), tilings.end(), [] (archimedean_tiling& s1, archimedean_tiling& s2) {
|
||||||
if(s1.euclidean_angle_sum < s2.euclidean_angle_sum - 1e-6) return true;
|
if(s1.euclidean_angle_sum < s2.euclidean_angle_sum - 1e-6) return true;
|
||||||
if(s2.euclidean_angle_sum < s1.euclidean_angle_sum - 1e-6) return false;
|
if(s2.euclidean_angle_sum < s1.euclidean_angle_sum - 1e-6) return false;
|
||||||
|
@@ -2082,7 +2082,7 @@ EX namespace heat {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
offscreen_heat = move(offscreen2);
|
offscreen_heat = std::move(offscreen2);
|
||||||
|
|
||||||
for(int i=0; i<numplayers(); i++) {
|
for(int i=0; i<numplayers(); i++) {
|
||||||
cell *c = playerpos(i);
|
cell *c = playerpos(i);
|
||||||
@@ -2329,7 +2329,7 @@ EX namespace heat {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
offscreen_fire = move(offscreen2);
|
offscreen_fire = std::move(offscreen2);
|
||||||
}
|
}
|
||||||
|
|
||||||
EX }
|
EX }
|
||||||
|
@@ -148,7 +148,7 @@ EX namespace brownian {
|
|||||||
|
|
||||||
EX void apply_futures(cell *c) {
|
EX void apply_futures(cell *c) {
|
||||||
if(futures.count(c)) {
|
if(futures.count(c)) {
|
||||||
auto m = move(futures[c]);
|
auto m = std::move(futures[c]);
|
||||||
futures.erase(c);
|
futures.erase(c);
|
||||||
for(auto p: m)
|
for(auto p: m)
|
||||||
recurse(p.first, p.second);
|
recurse(p.first, p.second);
|
||||||
|
@@ -269,7 +269,7 @@ struct crystal_structure {
|
|||||||
next.resize(4, {2,3,1,0});
|
next.resize(4, {2,3,1,0});
|
||||||
next_to_prev();
|
next_to_prev();
|
||||||
while(dir < S7) {
|
while(dir < S7) {
|
||||||
crystal_structure csx = move(*this);
|
crystal_structure csx = std::move(*this);
|
||||||
add_dimension_to(csx);
|
add_dimension_to(csx);
|
||||||
}
|
}
|
||||||
if(dir > S7) remove_half_dimension();
|
if(dir > S7) remove_half_dimension();
|
||||||
|
10
drawing.cpp
10
drawing.cpp
@@ -2206,13 +2206,13 @@ EX void sort_drawqueue() {
|
|||||||
|
|
||||||
#if MINIMIZE_GL_CALLS
|
#if MINIMIZE_GL_CALLS
|
||||||
map<color_t, vector<unique_ptr<drawqueueitem>>> subqueue;
|
map<color_t, vector<unique_ptr<drawqueueitem>>> subqueue;
|
||||||
for(auto& p: ptds) subqueue[(p->prio == PPR::CIRCLE || p->prio == PPR::OUTCIRCLE) ? 0 : p->outline_group()].push_back(move(p));
|
for(auto& p: ptds) subqueue[(p->prio == PPR::CIRCLE || p->prio == PPR::OUTCIRCLE) ? 0 : p->outline_group()].push_back(std::move(p));
|
||||||
ptds.clear();
|
ptds.clear();
|
||||||
for(auto& p: subqueue) for(auto& r: p.second) ptds.push_back(move(r));
|
for(auto& p: subqueue) for(auto& r: p.second) ptds.push_back(std::move(r));
|
||||||
subqueue.clear();
|
subqueue.clear();
|
||||||
for(auto& p: ptds) subqueue[(p->prio == PPR::CIRCLE || p->prio == PPR::OUTCIRCLE) ? 0 : p->color].push_back(move(p));
|
for(auto& p: ptds) subqueue[(p->prio == PPR::CIRCLE || p->prio == PPR::OUTCIRCLE) ? 0 : p->color].push_back(std::move(p));
|
||||||
ptds.clear();
|
ptds.clear();
|
||||||
for(auto& p: subqueue) for(auto& r: p.second) ptds.push_back(move(r));
|
for(auto& p: subqueue) for(auto& r: p.second) ptds.push_back(std::move(r));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for(auto& p: ptds) {
|
for(auto& p: ptds) {
|
||||||
@@ -2233,7 +2233,7 @@ EX void sort_drawqueue() {
|
|||||||
vector<unique_ptr<drawqueueitem>> ptds2;
|
vector<unique_ptr<drawqueueitem>> ptds2;
|
||||||
ptds2.resize(siz);
|
ptds2.resize(siz);
|
||||||
|
|
||||||
for(int i = 0; i<siz; i++) ptds2[qp[int(ptds[i]->prio)]++] = move(ptds[i]);
|
for(int i = 0; i<siz; i++) ptds2[qp[int(ptds[i]->prio)]++] = std::move(ptds[i]);
|
||||||
swap(ptds, ptds2);
|
swap(ptds, ptds2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -859,7 +859,7 @@ EX void monstersTurn() {
|
|||||||
|
|
||||||
changes.value_keep(crush_now);
|
changes.value_keep(crush_now);
|
||||||
changes.value_keep(crush_next);
|
changes.value_keep(crush_next);
|
||||||
crush_now = move(crush_next);
|
crush_now = std::move(crush_next);
|
||||||
crush_next.clear();
|
crush_next.clear();
|
||||||
|
|
||||||
DEBB(DF_TURN, ("heat"));
|
DEBB(DF_TURN, ("heat"));
|
||||||
|
@@ -190,7 +190,7 @@ void expansion_analyzer::reduce_grouping() {
|
|||||||
for(int i=0; i<nogroups; i++)
|
for(int i=0; i<nogroups; i++)
|
||||||
for(int j: children[groupsample[i]])
|
for(int j: children[groupsample[i]])
|
||||||
newchildren[i].push_back(grouping[j]);
|
newchildren[i].push_back(grouping[j]);
|
||||||
children = move(newchildren);
|
children = std::move(newchildren);
|
||||||
for(auto& p: codeid) p.second = grouping[p.second];
|
for(auto& p: codeid) p.second = grouping[p.second];
|
||||||
N = nogroups;
|
N = nogroups;
|
||||||
rootid = grouping[rootid];
|
rootid = grouping[rootid];
|
||||||
@@ -1082,4 +1082,4 @@ EX int hyperbolic_celldistance(cell *c1, cell *c2) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -148,7 +148,7 @@ void bitruncate() {
|
|||||||
cells[id].neid[(k+5)%6] = bitruncated_id[make_pair(i, next)];
|
cells[id].neid[(k+5)%6] = bitruncated_id[make_pair(i, next)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cells[i].neid = move(newnei);
|
cells[i].neid = std::move(newnei);
|
||||||
}
|
}
|
||||||
make_cells_of_heptagon();
|
make_cells_of_heptagon();
|
||||||
compute_jpoints();
|
compute_jpoints();
|
||||||
@@ -241,7 +241,7 @@ bool step(int delta) {
|
|||||||
ld val = hdist(h, relmatrices[p.owner] * p.p);
|
ld val = hdist(h, relmatrices[p.owner] * p.p);
|
||||||
if(val < mindist) mindist = val;
|
if(val < mindist) mindist = val;
|
||||||
}
|
}
|
||||||
if(mindist > bestval) bestval = mindist, s.owner = c, s.p = h, s.relmatrices = move(relmatrices);
|
if(mindist > bestval) bestval = mindist, s.owner = c, s.p = h, s.relmatrices = std::move(relmatrices);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
make_cells_of_heptagon();
|
make_cells_of_heptagon();
|
||||||
|
@@ -2371,7 +2371,7 @@ EX namespace mapeditor {
|
|||||||
}
|
}
|
||||||
if(uni == 'c') dsCur->list.push_back(best);
|
if(uni == 'c') dsCur->list.push_back(best);
|
||||||
else if(uni == 'd') {
|
else if(uni == 'd') {
|
||||||
vector<hyperpoint> oldlist = move(dsCur->list);
|
vector<hyperpoint> oldlist = std::move(dsCur->list);
|
||||||
dsCur->list.clear();
|
dsCur->list.clear();
|
||||||
int i;
|
int i;
|
||||||
for(i=0; i<isize(oldlist); i+=3)
|
for(i=0; i<isize(oldlist); i+=3)
|
||||||
|
2
reg3.cpp
2
reg3.cpp
@@ -1231,7 +1231,7 @@ EX namespace reg3 {
|
|||||||
nb.insert(v - by * (v[index] / by[index]));
|
nb.insert(v - by * (v[index] / by[index]));
|
||||||
else println(hlog, "error");
|
else println(hlog, "error");
|
||||||
|
|
||||||
boundaries = move(nb);
|
boundaries = std::move(nb);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -389,17 +389,17 @@ void bantar_frame() {
|
|||||||
drawthemap();
|
drawthemap();
|
||||||
if(0) for(auto p: parent) if(gmatrix.count(p.first) && gmatrix.count(p.second) && infos[p.first].gid == i && infos[p.second].gid == i)
|
if(0) for(auto p: parent) if(gmatrix.count(p.first) && gmatrix.count(p.second) && infos[p.first].gid == i && infos[p.second].gid == i)
|
||||||
queueline(tC0(gmatrix[p.first]), tC0(gmatrix[p.second]), 0xFFFFFFFF, 2);
|
queueline(tC0(gmatrix[p.first]), tC0(gmatrix[p.second]), 0xFFFFFFFF, 2);
|
||||||
subscr[i] = move(ptds);
|
subscr[i] = std::move(ptds);
|
||||||
}
|
}
|
||||||
|
|
||||||
map<int, map<int, vector<unique_ptr<drawqueueitem>>>> xptds;
|
map<int, map<int, vector<unique_ptr<drawqueueitem>>>> xptds;
|
||||||
for(int i=0; i<4; i++) for(auto& p: subscr[i])
|
for(int i=0; i<4; i++) for(auto& p: subscr[i])
|
||||||
xptds[int(p->prio)][i].push_back(move(p));
|
xptds[int(p->prio)][i].push_back(std::move(p));
|
||||||
|
|
||||||
for(auto& sm: xptds) for(auto& sm2: sm.second) {
|
for(auto& sm: xptds) for(auto& sm2: sm.second) {
|
||||||
int i = sm2.first;
|
int i = sm2.first;
|
||||||
ptds.clear();
|
ptds.clear();
|
||||||
for(auto& p: sm2.second) ptds.push_back(move(p));
|
for(auto& p: sm2.second) ptds.push_back(std::move(p));
|
||||||
|
|
||||||
pconf.scale = .5;
|
pconf.scale = .5;
|
||||||
pconf.xposition = (!(i&2)) ? xdst : -xdst;
|
pconf.xposition = (!(i&2)) ? xdst : -xdst;
|
||||||
|
@@ -313,7 +313,7 @@ void wfc() {
|
|||||||
nfreq.emplace_back(p);
|
nfreq.emplace_back(p);
|
||||||
nfreq.back().code |= (code_t(c) << sh);
|
nfreq.back().code |= (code_t(c) << sh);
|
||||||
}
|
}
|
||||||
freq = move(nfreq);
|
freq = std::move(nfreq);
|
||||||
nfreq = {};
|
nfreq = {};
|
||||||
// println(hlog, "inpath = ", inpath);
|
// println(hlog, "inpath = ", inpath);
|
||||||
// println(hlog, "freqs = ", isize(freq));
|
// println(hlog, "freqs = ", isize(freq));
|
||||||
|
@@ -157,8 +157,8 @@ void clean_old_shots() {
|
|||||||
sh.get().delete_message();
|
sh.get().delete_message();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
remaining.emplace_back(move(sh));
|
remaining.emplace_back(std::move(sh));
|
||||||
old_shots = move(remaining);
|
old_shots = std::move(remaining);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -91,7 +91,7 @@ void loadsamples(const string& fname) {
|
|||||||
if(c == '!' && s.name == "") shown = true;
|
if(c == '!' && s.name == "") shown = true;
|
||||||
else if(!rv_ignore(c)) s.name += c;
|
else if(!rv_ignore(c)) s.name += c;
|
||||||
}
|
}
|
||||||
data.push_back(move(s));
|
data.push_back(std::move(s));
|
||||||
if(shown)
|
if(shown)
|
||||||
samples_to_show.push_back(isize(data)-1);
|
samples_to_show.push_back(isize(data)-1);
|
||||||
}
|
}
|
||||||
@@ -624,7 +624,7 @@ void verify_crawlers() {
|
|||||||
breakcheck:
|
breakcheck:
|
||||||
cellcrawler cr;
|
cellcrawler cr;
|
||||||
cr.build(cellwalker(c, id.second));
|
cr.build(cellwalker(c, id.second));
|
||||||
allcrawlers[id.first] = move(cr);
|
allcrawlers[id.first] = std::move(cr);
|
||||||
uniq++;
|
uniq++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -97,7 +97,7 @@ void create_data() {
|
|||||||
where.push_back(c);
|
where.push_back(c);
|
||||||
sample s;
|
sample s;
|
||||||
embeddings::get_coordinates(s.val, c, c0);
|
embeddings::get_coordinates(s.val, c, c0);
|
||||||
data.push_back(move(s));
|
data.push_back(std::move(s));
|
||||||
}
|
}
|
||||||
samples = isize(data);
|
samples = isize(data);
|
||||||
test_orig.size = samples;
|
test_orig.size = samples;
|
||||||
|
@@ -480,8 +480,8 @@ void run_kuen() {
|
|||||||
int it = 0;
|
int it = 0;
|
||||||
for(auto p: rug::points) p->dexp_id = it++;
|
for(auto p: rug::points) p->dexp_id = it++;
|
||||||
|
|
||||||
vector<rug::rugpoint*> mesh = move(rug::points);
|
vector<rug::rugpoint*> mesh = std::move(rug::points);
|
||||||
vector<rug::triangle> old_triangles = move(rug::triangles);
|
vector<rug::triangle> old_triangles = std::move(rug::triangles);
|
||||||
|
|
||||||
rug::clear_model();
|
rug::clear_model();
|
||||||
|
|
||||||
|
@@ -979,7 +979,7 @@ string tes;
|
|||||||
|
|
||||||
void init_textureconfig() {
|
void init_textureconfig() {
|
||||||
#if CAP_CONFIG
|
#if CAP_CONFIG
|
||||||
texturesavers = move(savers);
|
texturesavers = std::move(savers);
|
||||||
for(int i=0; i<3; i++)
|
for(int i=0; i<3; i++)
|
||||||
for(int j=0; j<3; j++)
|
for(int j=0; j<3; j++)
|
||||||
addsaver(config.itt[i][j], "texturematrix_" + its(i) + its(j), i==j ? 1 : 0);
|
addsaver(config.itt[i][j], "texturematrix_" + its(i) + its(j), i==j ? 1 : 0);
|
||||||
@@ -1131,10 +1131,10 @@ bool texture_config::load() {
|
|||||||
models::configure();
|
models::configure();
|
||||||
drawthemap();
|
drawthemap();
|
||||||
config.tstate = config.tstate_max = tsActive;
|
config.tstate = config.tstate_max = tsActive;
|
||||||
string s = move(texture_tuner);
|
string s = std::move(texture_tuner);
|
||||||
perform_mapping();
|
perform_mapping();
|
||||||
|
|
||||||
texture_tuner = move(s);
|
texture_tuner = std::move(s);
|
||||||
|
|
||||||
if(texture_tuner != "") {
|
if(texture_tuner != "") {
|
||||||
texture_tuned = true;
|
texture_tuned = true;
|
||||||
@@ -1665,7 +1665,7 @@ void texture_config::true_remap() {
|
|||||||
if(GOLDBERG || IRREGULAR) pshift += si.dir;
|
if(GOLDBERG || IRREGULAR) pshift += si.dir;
|
||||||
mapTexture(c, mi2, si, ggmatrix(c), pshift);
|
mapTexture(c, mi2, si, ggmatrix(c), pshift);
|
||||||
mapTexture2(mi2);
|
mapTexture2(mi2);
|
||||||
mi2.tvertices = move(new_tvertices);
|
mi2.tvertices = std::move(new_tvertices);
|
||||||
// printf("%08x remapping %d vertices to %d vertices\n", si.id, isize(mi.tvertices), isize(mi2.tvertices));
|
// printf("%08x remapping %d vertices to %d vertices\n", si.id, isize(mi.tvertices), isize(mi2.tvertices));
|
||||||
}
|
}
|
||||||
catch(out_of_range&) {
|
catch(out_of_range&) {
|
||||||
|
Reference in New Issue
Block a user