Fix more instances of Clang's -Wunqualified-std-cast-call

This commit is contained in:
Arthur O'Dwyer 2022-07-05 13:23:05 -04:00
parent 85753d240f
commit 0ae74aad62
17 changed files with 32 additions and 32 deletions

View File

@ -1314,7 +1314,7 @@ EX void show() {
}
else {
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) {
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;

View File

@ -2082,7 +2082,7 @@ EX namespace heat {
}
}
offscreen_heat = move(offscreen2);
offscreen_heat = std::move(offscreen2);
for(int i=0; i<numplayers(); i++) {
cell *c = playerpos(i);
@ -2329,7 +2329,7 @@ EX namespace heat {
}
}
offscreen_fire = move(offscreen2);
offscreen_fire = std::move(offscreen2);
}
EX }

View File

@ -148,7 +148,7 @@ EX namespace brownian {
EX void apply_futures(cell *c) {
if(futures.count(c)) {
auto m = move(futures[c]);
auto m = std::move(futures[c]);
futures.erase(c);
for(auto p: m)
recurse(p.first, p.second);

View File

@ -269,7 +269,7 @@ struct crystal_structure {
next.resize(4, {2,3,1,0});
next_to_prev();
while(dir < S7) {
crystal_structure csx = move(*this);
crystal_structure csx = std::move(*this);
add_dimension_to(csx);
}
if(dir > S7) remove_half_dimension();

View File

@ -2206,13 +2206,13 @@ EX void sort_drawqueue() {
#if MINIMIZE_GL_CALLS
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();
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();
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();
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
for(auto& p: ptds) {
@ -2233,7 +2233,7 @@ EX void sort_drawqueue() {
vector<unique_ptr<drawqueueitem>> ptds2;
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);
}

View File

@ -859,7 +859,7 @@ EX void monstersTurn() {
changes.value_keep(crush_now);
changes.value_keep(crush_next);
crush_now = move(crush_next);
crush_now = std::move(crush_next);
crush_next.clear();
DEBB(DF_TURN, ("heat"));

View File

@ -190,7 +190,7 @@ void expansion_analyzer::reduce_grouping() {
for(int i=0; i<nogroups; i++)
for(int j: children[groupsample[i]])
newchildren[i].push_back(grouping[j]);
children = move(newchildren);
children = std::move(newchildren);
for(auto& p: codeid) p.second = grouping[p.second];
N = nogroups;
rootid = grouping[rootid];
@ -1082,4 +1082,4 @@ EX int hyperbolic_celldistance(cell *c1, cell *c2) {
}
}
}
}

View File

@ -148,7 +148,7 @@ void bitruncate() {
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();
compute_jpoints();
@ -241,7 +241,7 @@ bool step(int delta) {
ld val = hdist(h, relmatrices[p.owner] * p.p);
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();

View File

@ -2371,7 +2371,7 @@ EX namespace mapeditor {
}
if(uni == 'c') dsCur->list.push_back(best);
else if(uni == 'd') {
vector<hyperpoint> oldlist = move(dsCur->list);
vector<hyperpoint> oldlist = std::move(dsCur->list);
dsCur->list.clear();
int i;
for(i=0; i<isize(oldlist); i+=3)

View File

@ -1231,7 +1231,7 @@ EX namespace reg3 {
nb.insert(v - by * (v[index] / by[index]));
else println(hlog, "error");
boundaries = move(nb);
boundaries = std::move(nb);
break;
}
}

View File

@ -389,17 +389,17 @@ void bantar_frame() {
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)
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;
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) {
int i = sm2.first;
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.xposition = (!(i&2)) ? xdst : -xdst;

View File

@ -313,7 +313,7 @@ void wfc() {
nfreq.emplace_back(p);
nfreq.back().code |= (code_t(c) << sh);
}
freq = move(nfreq);
freq = std::move(nfreq);
nfreq = {};
// println(hlog, "inpath = ", inpath);
// println(hlog, "freqs = ", isize(freq));

View File

@ -157,8 +157,8 @@ void clean_old_shots() {
sh.get().delete_message();
}
else
remaining.emplace_back(move(sh));
old_shots = move(remaining);
remaining.emplace_back(std::move(sh));
old_shots = std::move(remaining);
*/
}

View File

@ -91,7 +91,7 @@ void loadsamples(const string& fname) {
if(c == '!' && s.name == "") shown = true;
else if(!rv_ignore(c)) s.name += c;
}
data.push_back(move(s));
data.push_back(std::move(s));
if(shown)
samples_to_show.push_back(isize(data)-1);
}
@ -624,7 +624,7 @@ void verify_crawlers() {
breakcheck:
cellcrawler cr;
cr.build(cellwalker(c, id.second));
allcrawlers[id.first] = move(cr);
allcrawlers[id.first] = std::move(cr);
uniq++;
}
}

View File

@ -97,7 +97,7 @@ void create_data() {
where.push_back(c);
sample s;
embeddings::get_coordinates(s.val, c, c0);
data.push_back(move(s));
data.push_back(std::move(s));
}
samples = isize(data);
test_orig.size = samples;

View File

@ -480,8 +480,8 @@ void run_kuen() {
int it = 0;
for(auto p: rug::points) p->dexp_id = it++;
vector<rug::rugpoint*> mesh = move(rug::points);
vector<rug::triangle> old_triangles = move(rug::triangles);
vector<rug::rugpoint*> mesh = std::move(rug::points);
vector<rug::triangle> old_triangles = std::move(rug::triangles);
rug::clear_model();

View File

@ -979,7 +979,7 @@ string tes;
void init_textureconfig() {
#if CAP_CONFIG
texturesavers = move(savers);
texturesavers = std::move(savers);
for(int i=0; i<3; i++)
for(int j=0; j<3; j++)
addsaver(config.itt[i][j], "texturematrix_" + its(i) + its(j), i==j ? 1 : 0);
@ -1131,10 +1131,10 @@ bool texture_config::load() {
models::configure();
drawthemap();
config.tstate = config.tstate_max = tsActive;
string s = move(texture_tuner);
string s = std::move(texture_tuner);
perform_mapping();
texture_tuner = move(s);
texture_tuner = std::move(s);
if(texture_tuner != "") {
texture_tuned = true;
@ -1665,7 +1665,7 @@ void texture_config::true_remap() {
if(GOLDBERG || IRREGULAR) pshift += si.dir;
mapTexture(c, mi2, si, ggmatrix(c), pshift);
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));
}
catch(out_of_range&) {