Fix 'unqualified call to std::move' errors in clang 15+

This commit is contained in:
Konstantinos Margaritis 2023-10-03 20:24:39 +03:00
parent 4918f81ea3
commit 0d2f9ccbaa
37 changed files with 224 additions and 224 deletions

View File

@ -98,7 +98,7 @@ public:
const FDREngineDescription &eng_in, const FDREngineDescription &eng_in,
bool make_small_in, const Grey &grey_in) bool make_small_in, const Grey &grey_in)
: eng(eng_in), grey(grey_in), tab(eng_in.getTabSizeBytes()), : eng(eng_in), grey(grey_in), tab(eng_in.getTabSizeBytes()),
lits(move(lits_in)), bucketToLits(move(bucketToLits_in)), lits(std::move(lits_in)), bucketToLits(std::move(bucketToLits_in)),
make_small(make_small_in) {} make_small(make_small_in) {}
bytecode_ptr<FDR> build(); bytecode_ptr<FDR> build();
@ -504,7 +504,7 @@ map<BucketIndex, vector<LiteralIndex>> assignStringsToBuckets(
map<BucketIndex, vector<LiteralIndex>> bucketToLits; map<BucketIndex, vector<LiteralIndex>> bucketToLits;
size_t bucketCnt = buckets.size(); size_t bucketCnt = buckets.size();
for (size_t i = 0; i < bucketCnt; i++) { for (size_t i = 0; i < bucketCnt; i++) {
bucketToLits.emplace(bucketCnt - i - 1, move(buckets[i])); bucketToLits.emplace(bucketCnt - i - 1, std::move(buckets[i]));
} }
return bucketToLits; return bucketToLits;
@ -867,7 +867,7 @@ unique_ptr<HWLMProto> fdrBuildProtoInternal(u8 engType,
auto bucketToLits = assignStringsToBuckets(lits, *des); auto bucketToLits = assignStringsToBuckets(lits, *des);
addIncludedInfo(lits, des->getNumBuckets(), bucketToLits); addIncludedInfo(lits, des->getNumBuckets(), bucketToLits);
auto proto = auto proto =
std::make_unique<HWLMProto>(engType, move(des), lits, bucketToLits, std::make_unique<HWLMProto>(engType, std::move(des), lits, bucketToLits,
make_small); make_small);
return proto; return proto;
} }

View File

@ -309,7 +309,7 @@ setupFullConfs(const vector<hwlmLiteral> &lits,
DEBUG_PRINTF("b %d sz %zu\n", b, vl.size()); DEBUG_PRINTF("b %d sz %zu\n", b, vl.size());
auto fc = getFDRConfirm(vl, make_small); auto fc = getFDRConfirm(vl, make_small);
totalConfirmSize += fc.size(); totalConfirmSize += fc.size();
bc2Conf.emplace(b, move(fc)); bc2Conf.emplace(b, std::move(fc));
} }
} }

View File

@ -88,7 +88,7 @@ public:
const TeddyEngineDescription &eng_in, bool make_small_in, const TeddyEngineDescription &eng_in, bool make_small_in,
const Grey &grey_in) const Grey &grey_in)
: eng(eng_in), grey(grey_in), lits(lits_in), : eng(eng_in), grey(grey_in), lits(lits_in),
bucketToLits(move(bucketToLits_in)), make_small(make_small_in) {} bucketToLits(std::move(bucketToLits_in)), make_small(make_small_in) {}
bytecode_ptr<FDR> build(); bytecode_ptr<FDR> build();
}; };
@ -676,7 +676,7 @@ unique_ptr<HWLMProto> teddyBuildProtoHinted(
return nullptr; return nullptr;
} }
return std::make_unique<HWLMProto>(engType, move(des), lits, return std::make_unique<HWLMProto>(engType, std::move(des), lits,
bucketToLits, make_small); bucketToLits, make_small);
} }

View File

@ -57,24 +57,24 @@ using namespace std;
namespace ue2 { namespace ue2 {
HWLMProto::HWLMProto(u8 engType_in, vector<hwlmLiteral> lits_in) HWLMProto::HWLMProto(u8 engType_in, vector<hwlmLiteral> lits_in)
: engType(engType_in), lits(move(lits_in)) {} : engType(engType_in), lits(std::move(lits_in)) {}
HWLMProto::HWLMProto(u8 engType_in, HWLMProto::HWLMProto(u8 engType_in,
unique_ptr<FDREngineDescription> eng_in, unique_ptr<FDREngineDescription> eng_in,
vector<hwlmLiteral> lits_in, vector<hwlmLiteral> lits_in,
map<u32, vector<u32>> bucketToLits_in, map<u32, vector<u32>> bucketToLits_in,
bool make_small_in) bool make_small_in)
: engType(engType_in), fdrEng(move(eng_in)), lits(move(lits_in)), : engType(engType_in), fdrEng(std::move(eng_in)), lits(std::move(lits_in)),
bucketToLits(move(bucketToLits_in)), make_small(make_small_in) {} bucketToLits(std::move(bucketToLits_in)), make_small(make_small_in) {}
HWLMProto::HWLMProto(u8 engType_in, HWLMProto::HWLMProto(u8 engType_in,
unique_ptr<TeddyEngineDescription> eng_in, unique_ptr<TeddyEngineDescription> eng_in,
vector<hwlmLiteral> lits_in, vector<hwlmLiteral> lits_in,
map<u32, vector<u32>> bucketToLits_in, map<u32, vector<u32>> bucketToLits_in,
bool make_small_in) bool make_small_in)
: engType(engType_in), teddyEng(move(eng_in)), : engType(engType_in), teddyEng(std::move(eng_in)),
lits(move(lits_in)), lits(std::move(lits_in)),
bucketToLits(move(bucketToLits_in)), make_small(make_small_in) {} bucketToLits(std::move(bucketToLits_in)), make_small(make_small_in) {}
HWLMProto::~HWLMProto() {} HWLMProto::~HWLMProto() {}
@ -132,14 +132,14 @@ bytecode_ptr<HWLM> hwlmBuild(const HWLMProto &proto, const CompileContext &cc,
if (noodle) { if (noodle) {
engSize = noodle.size(); engSize = noodle.size();
} }
eng = move(noodle); eng = std::move(noodle);
} else { } else {
DEBUG_PRINTF("building a new deal\n"); DEBUG_PRINTF("building a new deal\n");
auto fdr = fdrBuildTable(proto, cc.grey); auto fdr = fdrBuildTable(proto, cc.grey);
if (fdr) { if (fdr) {
engSize = fdr.size(); engSize = fdr.size();
} }
eng = move(fdr); eng = std::move(fdr);
} }
if (!eng) { if (!eng) {

View File

@ -130,14 +130,14 @@ void extend(const raw_dfa &rdfa, const vector<CharReach> &rev_map,
} else { } else {
path pp = append(p, CharReach(), p.dest); path pp = append(p, CharReach(), p.dest);
all[p.dest].emplace_back(pp); all[p.dest].emplace_back(pp);
out.emplace_back(move(pp)); out.emplace_back(std::move(pp));
} }
} }
if (!s.reports_eod.empty()) { if (!s.reports_eod.empty()) {
path pp = append(p, CharReach(), p.dest); path pp = append(p, CharReach(), p.dest);
all[p.dest].emplace_back(pp); all[p.dest].emplace_back(pp);
out.emplace_back(move(pp)); out.emplace_back(std::move(pp));
} }
flat_map<u32, CharReach> dest; flat_map<u32, CharReach> dest;
@ -157,7 +157,7 @@ void extend(const raw_dfa &rdfa, const vector<CharReach> &rev_map,
DEBUG_PRINTF("----good: [%s] -> %u\n", DEBUG_PRINTF("----good: [%s] -> %u\n",
describeClasses(pp.reach).c_str(), pp.dest); describeClasses(pp.reach).c_str(), pp.dest);
all[e.first].emplace_back(pp); all[e.first].emplace_back(pp);
out.emplace_back(move(pp)); out.emplace_back(std::move(pp));
} }
} }
@ -174,7 +174,7 @@ vector<vector<CharReach>> generate_paths(const raw_dfa &rdfa,
extend(rdfa, rev_map, p, all, next_gen); extend(rdfa, rev_map, p, all, next_gen);
} }
paths = move(next_gen); paths = std::move(next_gen);
} }
dump_paths(paths); dump_paths(paths);

View File

@ -1299,7 +1299,7 @@ unique_ptr<raw_report_info> gough_build_strat::gatherReports(
*arbReport = MO_INVALID_IDX; *arbReport = MO_INVALID_IDX;
assert(!ri->rl.empty()); /* all components should be able to generate assert(!ri->rl.empty()); /* all components should be able to generate
reports */ reports */
return move(ri); return std::move(ri);
} }
u32 raw_gough_report_info_impl::getReportListSize() const { u32 raw_gough_report_info_impl::getReportListSize() const {

View File

@ -1026,7 +1026,7 @@ u32 addReports(const flat_set<ReportID> &r, vector<ReportID> &reports,
u32 offset = verify_u32(reports.size()); u32 offset = verify_u32(reports.size());
insert(&reports, reports.end(), my_reports); insert(&reports, reports.end(), my_reports);
reports_cache.emplace(move(my_reports), offset); reports_cache.emplace(std::move(my_reports), offset);
return offset; return offset;
} }
@ -1064,7 +1064,7 @@ void buildAcceptsList(const build_info &args, ReportListCache &reports_cache,
a.reports = addReports(h[v].reports, reports, reports_cache); a.reports = addReports(h[v].reports, reports, reports_cache);
} }
a.squash = addSquashMask(args, v, squash); a.squash = addSquashMask(args, v, squash);
accepts.emplace_back(move(a)); accepts.emplace_back(std::move(a));
} }
} }
@ -1819,7 +1819,7 @@ struct Factory {
*streamState += streamStateLen; *streamState += streamStateLen;
*scratchStateSize += sizeof(RepeatControl); *scratchStateSize += sizeof(RepeatControl);
out.emplace_back(move(info)); out.emplace_back(std::move(info));
} }
} }

View File

@ -462,7 +462,7 @@ unique_ptr<raw_report_info> mcclellan_build_strat::gatherReports(
*isSingleReport = 0; *isSingleReport = 0;
} }
return move(ri); return std::move(ri);
} }
u32 raw_report_info_impl::getReportListSize() const { u32 raw_report_info_impl::getReportListSize() const {

View File

@ -319,7 +319,7 @@ void mergeDfas(vector<unique_ptr<raw_dfa>> &dfas, size_t max_states,
queue<unique_ptr<raw_dfa>> q; queue<unique_ptr<raw_dfa>> q;
for (auto &dfa : dfas) { for (auto &dfa : dfas) {
q.push(move(dfa)); q.push(std::move(dfa));
} }
// All DFAs are now on the queue, so we'll clear the vector and use it for // All DFAs are now on the queue, so we'll clear the vector and use it for
@ -328,30 +328,30 @@ void mergeDfas(vector<unique_ptr<raw_dfa>> &dfas, size_t max_states,
while (q.size() > 1) { while (q.size() > 1) {
// Attempt to merge the two front elements of the queue. // Attempt to merge the two front elements of the queue.
unique_ptr<raw_dfa> d1 = move(q.front()); unique_ptr<raw_dfa> d1 = std::move(q.front());
q.pop(); q.pop();
unique_ptr<raw_dfa> d2 = move(q.front()); unique_ptr<raw_dfa> d2 = std::move(q.front());
q.pop(); q.pop();
auto rdfa = mergeTwoDfas(d1.get(), d2.get(), max_states, rm, grey); auto rdfa = mergeTwoDfas(d1.get(), d2.get(), max_states, rm, grey);
if (rdfa) { if (rdfa) {
q.push(move(rdfa)); q.push(std::move(rdfa));
} else { } else {
DEBUG_PRINTF("failed to merge\n"); DEBUG_PRINTF("failed to merge\n");
// Put the larger of the two DFAs on the output list, retain the // Put the larger of the two DFAs on the output list, retain the
// smaller one on the queue for further merge attempts. // smaller one on the queue for further merge attempts.
if (d2->states.size() > d1->states.size()) { if (d2->states.size() > d1->states.size()) {
dfas.emplace_back(move(d2)); dfas.emplace_back(std::move(d2));
q.push(move(d1)); q.push(std::move(d1));
} else { } else {
dfas.emplace_back(move(d1)); dfas.emplace_back(std::move(d1));
q.push(move(d2)); q.push(std::move(d2));
} }
} }
} }
while (!q.empty()) { while (!q.empty()) {
dfas.emplace_back(move(q.front())); dfas.emplace_back(std::move(q.front()));
q.pop(); q.pop();
} }

View File

@ -270,7 +270,7 @@ unique_ptr<raw_report_info> sheng_build_strat::gatherReports(
*isSingleReport = 0; *isSingleReport = 0;
} }
return move(ri); return std::move(ri);
} }
u32 sheng_build_strat::max_allowed_offset_accel() const { u32 sheng_build_strat::max_allowed_offset_accel() const {

View File

@ -162,7 +162,7 @@ BuiltExpression NFABuilderImpl::getGraph() {
throw CompileError("Pattern too large."); throw CompileError("Pattern too large.");
} }
return { expr, move(graph) }; return { expr, std::move(graph) };
} }
void NFABuilderImpl::setNodeReportID(Position pos, int offsetAdjust) { void NFABuilderImpl::setNodeReportID(Position pos, int offsetAdjust) {

View File

@ -369,7 +369,7 @@ void splitIntoComponents(unique_ptr<NGHolder> g,
pruneUseless(*gc); pruneUseless(*gc);
DEBUG_PRINTF("component %zu has %zu vertices\n", comps.size(), DEBUG_PRINTF("component %zu has %zu vertices\n", comps.size(),
num_vertices(*gc)); num_vertices(*gc));
comps.emplace_back(move(gc)); comps.emplace_back(std::move(gc));
} }
// Another component to handle the direct shell-to-shell edges. // Another component to handle the direct shell-to-shell edges.
@ -385,7 +385,7 @@ void splitIntoComponents(unique_ptr<NGHolder> g,
pruneUseless(*gc); pruneUseless(*gc);
DEBUG_PRINTF("shell edge component %zu has %zu vertices\n", DEBUG_PRINTF("shell edge component %zu has %zu vertices\n",
comps.size(), num_vertices(*gc)); comps.size(), num_vertices(*gc));
comps.emplace_back(move(gc)); comps.emplace_back(std::move(gc));
*shell_comp = true; *shell_comp = true;
} }

View File

@ -349,7 +349,7 @@ vector<VertexInfoSet> partitionGraph(vector<unique_ptr<VertexInfo>> &infos,
unsigned eq_class = classes.size(); unsigned eq_class = classes.size();
vi->equivalence_class = eq_class; vi->equivalence_class = eq_class;
classes.push_back({vi.get()}); classes.push_back({vi.get()});
classinfomap.emplace(move(ci), eq_class); classinfomap.emplace(std::move(ci), eq_class);
} else { } else {
// vertex is added to an existing class. // vertex is added to an existing class.
unsigned eq_class = ii->second; unsigned eq_class = ii->second;
@ -441,7 +441,7 @@ void equivalence(vector<VertexInfoSet> &classes, WorkQueue &work_queue,
classes[cur_class].erase(vi); classes[cur_class].erase(vi);
new_class_vertices.insert(vi); new_class_vertices.insert(vi);
} }
classes.emplace_back(move(new_class_vertices)); classes.emplace_back(std::move(new_class_vertices));
if (contains(tmi->first, cur_class)) { if (contains(tmi->first, cur_class)) {
reval_queue.push(new_class); reval_queue.push(new_class);

View File

@ -254,7 +254,7 @@ void findBestInternal(vector<vector<CharReach>>::const_iterator pb,
DEBUG_PRINTF("worse\n"); DEBUG_PRINTF("worse\n");
continue; continue;
} }
priority_path.emplace_back(move(as)); priority_path.emplace_back(std::move(as));
} }
sort(priority_path.begin(), priority_path.end()); sort(priority_path.begin(), priority_path.end());
@ -422,7 +422,7 @@ void findDoubleBest(vector<vector<CharReach> >::const_iterator pb,
DEBUG_PRINTF("worse\n"); DEBUG_PRINTF("worse\n");
continue; continue;
} }
priority_path.emplace_back(move(as)); priority_path.emplace_back(std::move(as));
} }
sort(priority_path.begin(), priority_path.end()); sort(priority_path.begin(), priority_path.end());
@ -569,7 +569,7 @@ AccelScheme findBestAccelScheme(vector<vector<CharReach>> paths,
DAccelScheme da = findBestDoubleAccelScheme(paths, terminating); DAccelScheme da = findBestDoubleAccelScheme(paths, terminating);
if (da.double_byte.size() <= DOUBLE_SHUFTI_LIMIT) { if (da.double_byte.size() <= DOUBLE_SHUFTI_LIMIT) {
rv.double_byte = std::move(da.double_byte); rv.double_byte = std::move(da.double_byte);
rv.double_cr = move(da.double_cr); rv.double_cr = std::move(da.double_cr);
rv.double_offset = da.double_offset; rv.double_offset = da.double_offset;
} }
} }

View File

@ -67,7 +67,7 @@ namespace {
struct LitGraphVertexProps { struct LitGraphVertexProps {
LitGraphVertexProps() = default; LitGraphVertexProps() = default;
explicit LitGraphVertexProps(ue2_literal::elem c_in) : c(move(c_in)) {} explicit LitGraphVertexProps(ue2_literal::elem c_in) : c(std::move(c_in)) {}
ue2_literal::elem c; // string element (char + bool) ue2_literal::elem c; // string element (char + bool)
size_t index = 0; // managed by ue2_graph size_t index = 0; // managed by ue2_graph
}; };

View File

@ -237,7 +237,7 @@ bool handleDecoratedLiterals(RoseBuild &rose, const NGHolder &g,
DEBUG_PRINTF("failed validation\n"); DEBUG_PRINTF("failed validation\n");
return false; return false;
} }
masks.emplace_back(move(pm)); masks.emplace_back(std::move(pm));
} }
for (const auto &pm : masks) { for (const auto &pm : masks) {

View File

@ -100,7 +100,7 @@ void checkAndAddExitCandidate(const AcyclicGraph &g,
if (!open.empty()) { if (!open.empty()) {
DEBUG_PRINTF("exit %zu\n", g[v].index); DEBUG_PRINTF("exit %zu\n", g[v].index);
exits.emplace_back(move(v_exit)); exits.emplace_back(std::move(v_exit));
} }
} }
@ -210,7 +210,7 @@ void buildInitialCandidate(const AcyclicGraph &g,
if (it != ite) { if (it != ite) {
enters.erase(*it); enters.erase(*it);
open_jumps = move(enters); open_jumps = std::move(enters);
DEBUG_PRINTF("oj size = %zu\n", open_jumps.size()); DEBUG_PRINTF("oj size = %zu\n", open_jumps.size());
++it; ++it;
} else { } else {

View File

@ -1733,7 +1733,7 @@ void clearProperInEdges(NGHolder &g, const NFAVertex sink) {
namespace { namespace {
struct SomRevNfa { struct SomRevNfa {
SomRevNfa(NFAVertex s, ReportID r, bytecode_ptr<NFA> n) SomRevNfa(NFAVertex s, ReportID r, bytecode_ptr<NFA> n)
: sink(s), report(r), nfa(move(n)) {} : sink(s), report(r), nfa(std::move(n)) {}
NFAVertex sink; NFAVertex sink;
ReportID report; ReportID report;
bytecode_ptr<NFA> nfa; bytecode_ptr<NFA> nfa;
@ -1799,7 +1799,7 @@ bool makeSomRevNfa(vector<SomRevNfa> &som_nfas, const NGHolder &g,
return false; return false;
} }
som_nfas.emplace_back(sink, report, move(nfa)); som_nfas.emplace_back(sink, report, std::move(nfa));
return true; return true;
} }
@ -1839,7 +1839,7 @@ bool doSomRevNfa(NG &ng, NGHolder &g, const CompileContext &cc) {
assert(som_nfa.nfa); assert(som_nfa.nfa);
// Transfer ownership of the NFA to the SOM slot manager. // Transfer ownership of the NFA to the SOM slot manager.
u32 comp_id = ng.ssm.addRevNfa(move(som_nfa.nfa), maxWidth); u32 comp_id = ng.ssm.addRevNfa(std::move(som_nfa.nfa), maxWidth);
// Replace this report on 'g' with a SOM_REV_NFA report pointing at our // Replace this report on 'g' with a SOM_REV_NFA report pointing at our
// new component. // new component.
@ -1872,7 +1872,7 @@ u32 doSomRevNfaPrefix(NG &ng, const ExpressionInfo &expr, NGHolder &g,
max(cc.grey.maxHistoryAvailable, ng.maxSomRevHistoryAvailable)); max(cc.grey.maxHistoryAvailable, ng.maxSomRevHistoryAvailable));
} }
return ng.ssm.addRevNfa(move(nfa), maxWidth); return ng.ssm.addRevNfa(std::move(nfa), maxWidth);
} }
static static

View File

@ -394,7 +394,7 @@ void getSimpleRoseLiterals(const NGHolder &g, bool seeking_anchored,
lits->reserve(lit_info.size()); lits->reserve(lit_info.size());
for (auto &m : lit_info) { for (auto &m : lit_info) {
lits->emplace_back(move(m.second)); lits->emplace_back(std::move(m.second));
} }
DEBUG_PRINTF("%zu candidate literal sets\n", lits->size()); DEBUG_PRINTF("%zu candidate literal sets\n", lits->size());
} }
@ -707,11 +707,11 @@ unique_ptr<VertLitInfo> findBestSplit(const NGHolder &g,
auto cmp = LitComparator(g, seeking_anchored, seeking_transient, auto cmp = LitComparator(g, seeking_anchored, seeking_transient,
last_chance); last_chance);
unique_ptr<VertLitInfo> best = move(lits.back()); unique_ptr<VertLitInfo> best = std::move(lits.back());
lits.pop_back(); lits.pop_back();
while (!lits.empty()) { while (!lits.empty()) {
if (cmp(best, lits.back())) { if (cmp(best, lits.back())) {
best = move(lits.back()); best = std::move(lits.back());
} }
lits.pop_back(); lits.pop_back();
} }
@ -1621,7 +1621,7 @@ void removeRedundantLiteralsFromPrefixes(RoseInGraph &g,
if (delay && delay != MO_INVALID_IDX) { if (delay && delay != MO_INVALID_IDX) {
DEBUG_PRINTF("setting delay %u on lhs %p\n", delay, h.get()); DEBUG_PRINTF("setting delay %u on lhs %p\n", delay, h.get());
g[e].graph = move(h); g[e].graph = std::move(h);
g[e].graph_lag = delay; g[e].graph_lag = delay;
} }
} }

View File

@ -103,7 +103,7 @@ void ComponentAlternation::accept(ConstComponentVisitor &v) const {
} }
void ComponentAlternation::append(unique_ptr<Component> component) { void ComponentAlternation::append(unique_ptr<Component> component) {
children.emplace_back(move(component)); children.emplace_back(std::move(component));
} }
vector<PositionInfo> ComponentAlternation::first() const { vector<PositionInfo> ComponentAlternation::first() const {

View File

@ -50,7 +50,7 @@ ComponentCondReference::ComponentCondReference(const string &name)
: kind(CONDITION_NAME), ref_id(0), ref_name(name), hasBothBranches(false) {} : kind(CONDITION_NAME), ref_id(0), ref_name(name), hasBothBranches(false) {}
ComponentCondReference::ComponentCondReference(unique_ptr<Component> c) ComponentCondReference::ComponentCondReference(unique_ptr<Component> c)
: kind(CONDITION_ASSERTION), ref_id(0), assertion(move(c)), : kind(CONDITION_ASSERTION), ref_id(0), assertion(std::move(c)),
hasBothBranches(false) {} hasBothBranches(false) {}
ComponentCondReference::~ComponentCondReference() {} ComponentCondReference::~ComponentCondReference() {}

View File

@ -60,7 +60,7 @@ static constexpr u32 MAX_POSITIONS_EXPANDED = 500000; // arbitrarily huge
* extent is effectively zero. */ * extent is effectively zero. */
ComponentRepeat::ComponentRepeat(unique_ptr<Component> sub_comp_in, u32 min, ComponentRepeat::ComponentRepeat(unique_ptr<Component> sub_comp_in, u32 min,
u32 max, enum RepeatType t) u32 max, enum RepeatType t)
: type(t), sub_comp(move(sub_comp_in)), m_min(min), m_max(max), : type(t), sub_comp(std::move(sub_comp_in)), m_min(min), m_max(max),
posFirst(GlushkovBuildState::POS_UNINITIALIZED), posFirst(GlushkovBuildState::POS_UNINITIALIZED),
posLast(GlushkovBuildState::POS_UNINITIALIZED) { posLast(GlushkovBuildState::POS_UNINITIALIZED) {
assert(sub_comp); assert(sub_comp);
@ -361,7 +361,7 @@ void ComponentRepeat::postSubNotePositionHook() {
unique_ptr<ComponentRepeat> makeComponentRepeat(unique_ptr<Component> sub_comp, unique_ptr<ComponentRepeat> makeComponentRepeat(unique_ptr<Component> sub_comp,
u32 min, u32 max, u32 min, u32 max,
ComponentRepeat::RepeatType t) { ComponentRepeat::RepeatType t) {
return std::make_unique<ComponentRepeat>(move(sub_comp), min, max, t); return std::make_unique<ComponentRepeat>(std::move(sub_comp), min, max, t);
} }
} // namespace ue2 } // namespace ue2

View File

@ -116,7 +116,7 @@ void ComponentSequence::accept(ConstComponentVisitor &v) const {
} }
void ComponentSequence::addComponent(unique_ptr<Component> comp) { void ComponentSequence::addComponent(unique_ptr<Component> comp) {
children.emplace_back(move(comp)); children.emplace_back(std::move(comp));
} }
bool ComponentSequence::addRepeat(u32 min, u32 max, bool ComponentSequence::addRepeat(u32 min, u32 max,
@ -131,7 +131,7 @@ bool ComponentSequence::addRepeat(u32 min, u32 max,
return false; return false;
} }
children.back() = makeComponentRepeat(move(children.back()), min, max, children.back() = makeComponentRepeat(std::move(children.back()), min, max,
type); type);
assert(children.back()); assert(children.back());
return true; return true;
@ -144,14 +144,14 @@ void ComponentSequence::addAlternation() {
auto seq = std::make_unique<ComponentSequence>(); auto seq = std::make_unique<ComponentSequence>();
seq->children.swap(children); seq->children.swap(children);
alternation->append(move(seq)); alternation->append(std::move(seq));
} }
void ComponentSequence::finalize() { void ComponentSequence::finalize() {
if (alternation) { if (alternation) {
addAlternation(); addAlternation();
assert(children.empty()); assert(children.empty());
children.emplace_back(move(alternation)); children.emplace_back(std::move(alternation));
alternation = nullptr; alternation = nullptr;
} }
} }

View File

@ -163,7 +163,7 @@ ComponentSequence *enterSequence(ComponentSequence *parent,
assert(child); assert(child);
ComponentSequence *seq = child.get(); ComponentSequence *seq = child.get();
parent->addComponent(move(child)); parent->addComponent(std::move(child));
return seq; return seq;
} }
@ -175,7 +175,7 @@ void addLiteral(ComponentSequence *currentSeq, char c, const ParseMode &mode) {
assert(cc); assert(cc);
cc->add(c); cc->add(c);
cc->finalize(); cc->finalize();
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
} else { } else {
currentSeq->addComponent(getLiteralComponentClass(c, mode.caseless)); currentSeq->addComponent(getLiteralComponentClass(c, mode.caseless));
} }
@ -190,7 +190,7 @@ void addEscaped(ComponentSequence *currentSeq, unichar accum,
assert(cc); assert(cc);
cc->add(accum); cc->add(accum);
cc->finalize(); cc->finalize();
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
} else { } else {
if (accum > 255) { if (accum > 255) {
throw LocatedParseError(err_msg); throw LocatedParseError(err_msg);
@ -330,7 +330,7 @@ unichar readUtf8CodePoint4c(const char *s) {
PUSH_SEQUENCE; PUSH_SEQUENCE;
auto seq = std::make_unique<ComponentSequence>(); auto seq = std::make_unique<ComponentSequence>();
seq->setCaptureIndex(groupIndex++); seq->setCaptureIndex(groupIndex++);
currentSeq = enterSequence(currentSeq, move(seq)); currentSeq = enterSequence(currentSeq, std::move(seq));
} }
# enter a NAMED CAPTURING group ( e.g. (?'<hatstand>blah) ) # enter a NAMED CAPTURING group ( e.g. (?'<hatstand>blah) )
@ -347,7 +347,7 @@ unichar readUtf8CodePoint4c(const char *s) {
auto seq = std::make_unique<ComponentSequence>(); auto seq = std::make_unique<ComponentSequence>();
seq->setCaptureIndex(groupIndex++); seq->setCaptureIndex(groupIndex++);
seq->setCaptureName(label); seq->setCaptureName(label);
currentSeq = enterSequence(currentSeq, move(seq)); currentSeq = enterSequence(currentSeq, std::move(seq));
} }
# enter a NON-CAPTURING group where we're modifying flags # enter a NON-CAPTURING group where we're modifying flags
@ -724,7 +724,7 @@ unichar readUtf8CodePoint4c(const char *s) {
([^^] ${ fhold; fcall readUCP; }) ([^^] ${ fhold; fcall readUCP; })
'}' ${ if (!inCharClass) { // not inside [..] '}' ${ if (!inCharClass) { // not inside [..]
currentCls->finalize(); currentCls->finalize();
currentSeq->addComponent(move(currentCls)); currentSeq->addComponent(std::move(currentCls));
} }
fret; fret;
}) })
@ -735,7 +735,7 @@ unichar readUtf8CodePoint4c(const char *s) {
currentCls->add(CLASS_UCP_C, negated); currentCls->add(CLASS_UCP_C, negated);
if (!inCharClass) { if (!inCharClass) {
currentCls->finalize(); currentCls->finalize();
currentSeq->addComponent(move(currentCls)); currentSeq->addComponent(std::move(currentCls));
} }
fret; fret;
}; };
@ -743,7 +743,7 @@ unichar readUtf8CodePoint4c(const char *s) {
currentCls->add(CLASS_UCP_L, negated); currentCls->add(CLASS_UCP_L, negated);
if (!inCharClass) { if (!inCharClass) {
currentCls->finalize(); currentCls->finalize();
currentSeq->addComponent(move(currentCls)); currentSeq->addComponent(std::move(currentCls));
} }
fret; fret;
}; };
@ -751,7 +751,7 @@ unichar readUtf8CodePoint4c(const char *s) {
currentCls->add(CLASS_UCP_M, negated); currentCls->add(CLASS_UCP_M, negated);
if (!inCharClass) { if (!inCharClass) {
currentCls->finalize(); currentCls->finalize();
currentSeq->addComponent(move(currentCls)); currentSeq->addComponent(std::move(currentCls));
} }
fret; fret;
}; };
@ -759,7 +759,7 @@ unichar readUtf8CodePoint4c(const char *s) {
currentCls->add(CLASS_UCP_N, negated); currentCls->add(CLASS_UCP_N, negated);
if (!inCharClass) { if (!inCharClass) {
currentCls->finalize(); currentCls->finalize();
currentSeq->addComponent(move(currentCls)); currentSeq->addComponent(std::move(currentCls));
} }
fret; fret;
}; };
@ -767,7 +767,7 @@ unichar readUtf8CodePoint4c(const char *s) {
currentCls->add(CLASS_UCP_P, negated); currentCls->add(CLASS_UCP_P, negated);
if (!inCharClass) { if (!inCharClass) {
currentCls->finalize(); currentCls->finalize();
currentSeq->addComponent(move(currentCls)); currentSeq->addComponent(std::move(currentCls));
} }
fret; fret;
}; };
@ -775,7 +775,7 @@ unichar readUtf8CodePoint4c(const char *s) {
currentCls->add(CLASS_UCP_S, negated); currentCls->add(CLASS_UCP_S, negated);
if (!inCharClass) { if (!inCharClass) {
currentCls->finalize(); currentCls->finalize();
currentSeq->addComponent(move(currentCls)); currentSeq->addComponent(std::move(currentCls));
} }
fret; fret;
}; };
@ -783,7 +783,7 @@ unichar readUtf8CodePoint4c(const char *s) {
currentCls->add(CLASS_UCP_Z, negated); currentCls->add(CLASS_UCP_Z, negated);
if (!inCharClass) { if (!inCharClass) {
currentCls->finalize(); currentCls->finalize();
currentSeq->addComponent(move(currentCls)); currentSeq->addComponent(std::move(currentCls));
} }
fret; fret;
}; };
@ -1106,7 +1106,7 @@ unichar readUtf8CodePoint4c(const char *s) {
']' => { ']' => {
currentCls->finalize(); currentCls->finalize();
currentSeq->addComponent(move(currentCls)); currentSeq->addComponent(std::move(currentCls));
inCharClass = false; inCharClass = false;
fgoto main; fgoto main;
}; };
@ -1163,7 +1163,7 @@ unichar readUtf8CodePoint4c(const char *s) {
auto cc = getComponentClass(mode); auto cc = getComponentClass(mode);
cc->add(readUtf8CodePoint2c(ts)); cc->add(readUtf8CodePoint2c(ts));
cc->finalize(); cc->finalize();
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
}; };
utf8_3c when is_utf8 => { utf8_3c when is_utf8 => {
@ -1172,7 +1172,7 @@ unichar readUtf8CodePoint4c(const char *s) {
auto cc = getComponentClass(mode); auto cc = getComponentClass(mode);
cc->add(readUtf8CodePoint3c(ts)); cc->add(readUtf8CodePoint3c(ts));
cc->finalize(); cc->finalize();
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
}; };
utf8_4c when is_utf8 => { utf8_4c when is_utf8 => {
@ -1181,7 +1181,7 @@ unichar readUtf8CodePoint4c(const char *s) {
auto cc = getComponentClass(mode); auto cc = getComponentClass(mode);
cc->add(readUtf8CodePoint4c(ts)); cc->add(readUtf8CodePoint4c(ts));
cc->finalize(); cc->finalize();
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
}; };
hi_byte when is_utf8 => { hi_byte when is_utf8 => {
@ -1618,52 +1618,52 @@ unichar readUtf8CodePoint4c(const char *s) {
# Word character # Word character
'\\w' => { '\\w' => {
auto cc = generateComponent(CLASS_WORD, false, mode); auto cc = generateComponent(CLASS_WORD, false, mode);
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
}; };
# Non word character # Non word character
'\\W' => { '\\W' => {
auto cc = generateComponent(CLASS_WORD, true, mode); auto cc = generateComponent(CLASS_WORD, true, mode);
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
}; };
# Whitespace character # Whitespace character
'\\s' => { '\\s' => {
auto cc = generateComponent(CLASS_SPACE, false, mode); auto cc = generateComponent(CLASS_SPACE, false, mode);
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
}; };
# Non whitespace character # Non whitespace character
'\\S' => { '\\S' => {
auto cc = generateComponent(CLASS_SPACE, true, mode); auto cc = generateComponent(CLASS_SPACE, true, mode);
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
}; };
# Digit character # Digit character
'\\d' => { '\\d' => {
auto cc = generateComponent(CLASS_DIGIT, false, mode); auto cc = generateComponent(CLASS_DIGIT, false, mode);
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
}; };
# Non digit character # Non digit character
'\\D' => { '\\D' => {
auto cc = generateComponent(CLASS_DIGIT, true, mode); auto cc = generateComponent(CLASS_DIGIT, true, mode);
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
}; };
# Horizontal whitespace # Horizontal whitespace
'\\h' => { '\\h' => {
auto cc = generateComponent(CLASS_HORZ, false, mode); auto cc = generateComponent(CLASS_HORZ, false, mode);
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
}; };
# Not horizontal whitespace # Not horizontal whitespace
'\\H' => { '\\H' => {
auto cc = generateComponent(CLASS_HORZ, true, mode); auto cc = generateComponent(CLASS_HORZ, true, mode);
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
}; };
# Vertical whitespace # Vertical whitespace
'\\v' => { '\\v' => {
auto cc = generateComponent(CLASS_VERT, false, mode); auto cc = generateComponent(CLASS_VERT, false, mode);
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
}; };
# Not vertical whitespace # Not vertical whitespace
'\\V' => { '\\V' => {
auto cc = generateComponent(CLASS_VERT, true, mode); auto cc = generateComponent(CLASS_VERT, true, mode);
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
}; };
'\\p{' => { '\\p{' => {
@ -1787,7 +1787,7 @@ unichar readUtf8CodePoint4c(const char *s) {
ComponentAssertion *a_seq = a.get(); ComponentAssertion *a_seq = a.get();
PUSH_SEQUENCE; PUSH_SEQUENCE;
currentSeq = enterSequence(currentSeq, currentSeq = enterSequence(currentSeq,
std::make_unique<ComponentCondReference>(move(a))); std::make_unique<ComponentCondReference>(std::move(a)));
PUSH_SEQUENCE; PUSH_SEQUENCE;
currentSeq = a_seq; currentSeq = a_seq;
}; };
@ -1798,7 +1798,7 @@ unichar readUtf8CodePoint4c(const char *s) {
ComponentAssertion *a_seq = a.get(); ComponentAssertion *a_seq = a.get();
PUSH_SEQUENCE; PUSH_SEQUENCE;
currentSeq = enterSequence(currentSeq, currentSeq = enterSequence(currentSeq,
std::make_unique<ComponentCondReference>(move(a))); std::make_unique<ComponentCondReference>(std::move(a)));
PUSH_SEQUENCE; PUSH_SEQUENCE;
currentSeq = a_seq; currentSeq = a_seq;
}; };
@ -1809,7 +1809,7 @@ unichar readUtf8CodePoint4c(const char *s) {
ComponentAssertion *a_seq = a.get(); ComponentAssertion *a_seq = a.get();
PUSH_SEQUENCE; PUSH_SEQUENCE;
currentSeq = enterSequence(currentSeq, currentSeq = enterSequence(currentSeq,
std::make_unique<ComponentCondReference>(move(a))); std::make_unique<ComponentCondReference>(std::move(a)));
PUSH_SEQUENCE; PUSH_SEQUENCE;
currentSeq = a_seq; currentSeq = a_seq;
}; };
@ -1820,7 +1820,7 @@ unichar readUtf8CodePoint4c(const char *s) {
ComponentAssertion *a_seq = a.get(); ComponentAssertion *a_seq = a.get();
PUSH_SEQUENCE; PUSH_SEQUENCE;
currentSeq = enterSequence(currentSeq, currentSeq = enterSequence(currentSeq,
std::make_unique<ComponentCondReference>(move(a))); std::make_unique<ComponentCondReference>(std::move(a)));
PUSH_SEQUENCE; PUSH_SEQUENCE;
currentSeq = a_seq; currentSeq = a_seq;
}; };
@ -1861,7 +1861,7 @@ unichar readUtf8CodePoint4c(const char *s) {
auto cc = getComponentClass(mode); auto cc = getComponentClass(mode);
cc->add(readUtf8CodePoint2c(ts)); cc->add(readUtf8CodePoint2c(ts));
cc->finalize(); cc->finalize();
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
}; };
utf8_3c when is_utf8 => { utf8_3c when is_utf8 => {
@ -1870,7 +1870,7 @@ unichar readUtf8CodePoint4c(const char *s) {
auto cc = getComponentClass(mode); auto cc = getComponentClass(mode);
cc->add(readUtf8CodePoint3c(ts)); cc->add(readUtf8CodePoint3c(ts));
cc->finalize(); cc->finalize();
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
}; };
utf8_4c when is_utf8 => { utf8_4c when is_utf8 => {
@ -1879,7 +1879,7 @@ unichar readUtf8CodePoint4c(const char *s) {
auto cc = getComponentClass(mode); auto cc = getComponentClass(mode);
cc->add(readUtf8CodePoint4c(ts)); cc->add(readUtf8CodePoint4c(ts));
cc->finalize(); cc->finalize();
currentSeq->addComponent(move(cc)); currentSeq->addComponent(std::move(cc));
}; };
hi_byte when is_utf8 => { hi_byte when is_utf8 => {
@ -2024,7 +2024,7 @@ unique_ptr<Component> parse(const char *ptr, ParseMode &globalMode) {
// Ensure that all references are valid. // Ensure that all references are valid.
checkReferences(*rootSeq, groupIndex, groupNames); checkReferences(*rootSeq, groupIndex, groupNames);
return move(rootSeq); return std::move(rootSeq);
} catch (LocatedParseError &error) { } catch (LocatedParseError &error) {
if (ts >= ptr && ts <= pe) { if (ts >= ptr && ts <= pe) {
error.locate(ts - ptr); error.locate(ts - ptr);

View File

@ -1780,7 +1780,7 @@ bool RoseBuildImpl::addOutfix(const NGHolder &h) {
} }
if (rdfa) { if (rdfa) {
outfixes.emplace_back(OutfixInfo(move(rdfa))); outfixes.emplace_back(OutfixInfo(std::move(rdfa)));
} else { } else {
outfixes.emplace_back(OutfixInfo(cloneHolder(h))); outfixes.emplace_back(OutfixInfo(cloneHolder(h)));
} }

View File

@ -144,9 +144,9 @@ void mergeAnchoredDfas(vector<unique_ptr<raw_dfa>> &dfas,
for (auto &rdfa : dfas) { for (auto &rdfa : dfas) {
u32 start_size = mcclellanStartReachSize(rdfa.get()); u32 start_size = mcclellanStartReachSize(rdfa.get());
if (start_size <= MAX_SMALL_START_REACH) { if (start_size <= MAX_SMALL_START_REACH) {
small_starts.emplace_back(move(rdfa)); small_starts.emplace_back(std::move(rdfa));
} else { } else {
big_starts.emplace_back(move(rdfa)); big_starts.emplace_back(std::move(rdfa));
} }
} }
dfas.clear(); dfas.clear();
@ -158,10 +158,10 @@ void mergeAnchoredDfas(vector<unique_ptr<raw_dfa>> &dfas,
// Rehome our groups into one vector. // Rehome our groups into one vector.
for (auto &rdfa : small_starts) { for (auto &rdfa : small_starts) {
dfas.emplace_back(move(rdfa)); dfas.emplace_back(std::move(rdfa));
} }
for (auto &rdfa : big_starts) { for (auto &rdfa : big_starts) {
dfas.emplace_back(move(rdfa)); dfas.emplace_back(std::move(rdfa));
} }
// Final test: if we've built two DFAs here that are small enough, we can // Final test: if we've built two DFAs here that are small enough, we can
@ -685,7 +685,7 @@ int finalise_out(RoseBuildImpl &build, const NGHolder &h,
if (check_dupe(*out_dfa, build.anchored_nfas[hash], remap)) { if (check_dupe(*out_dfa, build.anchored_nfas[hash], remap)) {
return ANCHORED_REMAP; return ANCHORED_REMAP;
} }
build.anchored_nfas[hash].emplace_back(move(out_dfa)); build.anchored_nfas[hash].emplace_back(std::move(out_dfa));
return ANCHORED_SUCCESS; return ANCHORED_SUCCESS;
} }
@ -700,7 +700,7 @@ int addAutomaton(RoseBuildImpl &build, const NGHolder &h, ReportID *remap) {
auto out_dfa = std::make_unique<raw_dfa>(NFA_OUTFIX_RAW); auto out_dfa = std::make_unique<raw_dfa>(NFA_OUTFIX_RAW);
if (determinise(autom, out_dfa->states, MAX_DFA_STATES)) { if (determinise(autom, out_dfa->states, MAX_DFA_STATES)) {
return finalise_out(build, h, autom, move(out_dfa), remap); return finalise_out(build, h, autom, std::move(out_dfa), remap);
} }
DEBUG_PRINTF("determinise failed\n"); DEBUG_PRINTF("determinise failed\n");
@ -767,7 +767,7 @@ void buildSimpleDfas(const RoseBuildImpl &build, const vector<u32> &frag_map,
rdfa->start_floating = DEAD_STATE; rdfa->start_floating = DEAD_STATE;
rdfa->alpha_size = autom.alphasize; rdfa->alpha_size = autom.alphasize;
rdfa->alpha_remap = autom.alpha; rdfa->alpha_remap = autom.alpha;
anchored_dfas->emplace_back(move(rdfa)); anchored_dfas->emplace_back(std::move(rdfa));
} }
} }
@ -784,7 +784,7 @@ vector<unique_ptr<raw_dfa>> getAnchoredDfas(RoseBuildImpl &build,
// DFAs that already exist as raw_dfas. // DFAs that already exist as raw_dfas.
for (auto &anch_dfas : build.anchored_nfas) { for (auto &anch_dfas : build.anchored_nfas) {
for (auto &rdfa : anch_dfas.second) { for (auto &rdfa : anch_dfas.second) {
dfas.emplace_back(move(rdfa)); dfas.emplace_back(std::move(rdfa));
} }
} }
build.anchored_nfas.clear(); build.anchored_nfas.clear();
@ -834,7 +834,7 @@ size_t buildNfas(vector<raw_dfa> &anchored_dfas,
assert(nfa->length); assert(nfa->length);
total_size += ROUNDUP_CL(sizeof(anchored_matcher_info) + nfa->length); total_size += ROUNDUP_CL(sizeof(anchored_matcher_info) + nfa->length);
nfas->emplace_back(move(nfa)); nfas->emplace_back(std::move(nfa));
} }
// We no longer need to keep the raw_dfa structures around. // We no longer need to keep the raw_dfa structures around.
@ -861,7 +861,7 @@ vector<raw_dfa> buildAnchoredDfas(RoseBuildImpl &build,
dfas.reserve(anch_dfas.size()); dfas.reserve(anch_dfas.size());
for (auto &rdfa : anch_dfas) { for (auto &rdfa : anch_dfas) {
assert(rdfa); assert(rdfa);
dfas.emplace_back(move(*rdfa)); dfas.emplace_back(std::move(*rdfa));
} }
return dfas; return dfas;
} }

View File

@ -701,9 +701,9 @@ buildSuffix(const ReportManager &rm, const SomSlotManager &ssm,
auto d = getDfa(*rdfa, false, cc, rm); auto d = getDfa(*rdfa, false, cc, rm);
assert(d); assert(d);
if (cc.grey.roseMcClellanSuffix != 2) { if (cc.grey.roseMcClellanSuffix != 2) {
n = pickImpl(move(d), move(n), fast_nfa); n = pickImpl(std::move(d), std::move(n), fast_nfa);
} else { } else {
n = move(d); n = std::move(d);
} }
assert(n); assert(n);
@ -853,7 +853,7 @@ bytecode_ptr<NFA> makeLeftNfa(const RoseBuildImpl &tbi, left_id &left,
if (rdfa) { if (rdfa) {
auto d = getDfa(*rdfa, is_transient, cc, rm); auto d = getDfa(*rdfa, is_transient, cc, rm);
assert(d); assert(d);
n = pickImpl(move(d), move(n), fast_nfa); n = pickImpl(std::move(d), std::move(n), fast_nfa);
} }
} }
@ -1422,12 +1422,12 @@ void buildExclusiveInfixes(RoseBuildImpl &build, build_context &bc,
setLeftNfaProperties(*n, leftfix); setLeftNfaProperties(*n, leftfix);
ExclusiveSubengine engine; ExclusiveSubengine engine;
engine.nfa = move(n); engine.nfa = std::move(n);
engine.vertices = verts; engine.vertices = verts;
info.subengines.emplace_back(move(engine)); info.subengines.emplace_back(std::move(engine));
} }
info.queue = qif.get_queue(); info.queue = qif.get_queue();
exclusive_info.emplace_back(move(info)); exclusive_info.emplace_back(std::move(info));
} }
updateExclusiveInfixProperties(build, exclusive_info, bc.leftfix_info, updateExclusiveInfixProperties(build, exclusive_info, bc.leftfix_info,
no_retrigger_queues); no_retrigger_queues);
@ -1649,7 +1649,7 @@ public:
if (rdfa) { if (rdfa) {
auto d = getDfa(*rdfa, false, cc, rm); auto d = getDfa(*rdfa, false, cc, rm);
if (d) { if (d) {
n = pickImpl(move(d), move(n), fast_nfa); n = pickImpl(std::move(d), std::move(n), fast_nfa);
} }
} }
} }
@ -1864,15 +1864,15 @@ void buildExclusiveSuffixes(RoseBuildImpl &build, build_context &bc,
setSuffixProperties(*n, s, build.rm); setSuffixProperties(*n, s, build.rm);
ExclusiveSubengine engine; ExclusiveSubengine engine;
engine.nfa = move(n); engine.nfa = std::move(n);
engine.vertices = verts; engine.vertices = verts;
info.subengines.emplace_back(move(engine)); info.subengines.emplace_back(std::move(engine));
const auto &reports = all_reports(s); const auto &reports = all_reports(s);
info.reports.insert(reports.begin(), reports.end()); info.reports.insert(reports.begin(), reports.end());
} }
info.queue = qif.get_queue(); info.queue = qif.get_queue();
exclusive_info.emplace_back(move(info)); exclusive_info.emplace_back(std::move(info));
} }
updateExclusiveSuffixProperties(build, exclusive_info, updateExclusiveSuffixProperties(build, exclusive_info,
no_retrigger_queues); no_retrigger_queues);
@ -2416,7 +2416,7 @@ u32 writeProgram(build_context &bc, RoseProgram &&program) {
u32 offset = bc.engine_blob.add(prog_bytecode); u32 offset = bc.engine_blob.add(prog_bytecode);
DEBUG_PRINTF("prog len %zu written at offset %u\n", prog_bytecode.size(), DEBUG_PRINTF("prog len %zu written at offset %u\n", prog_bytecode.size(),
offset); offset);
bc.program_cache.emplace(move(program), offset); bc.program_cache.emplace(std::move(program), offset);
return offset; return offset;
} }
@ -2581,13 +2581,13 @@ void makeBoundaryPrograms(const RoseBuildImpl &build, build_context &bc,
DEBUG_PRINTF("report ^$: %zu\n", dboundary.report_at_0_eod_full.size()); DEBUG_PRINTF("report ^$: %zu\n", dboundary.report_at_0_eod_full.size());
auto eod_prog = makeBoundaryProgram(build, boundary.report_at_eod); auto eod_prog = makeBoundaryProgram(build, boundary.report_at_eod);
out.reportEodOffset = writeProgram(bc, move(eod_prog)); out.reportEodOffset = writeProgram(bc, std::move(eod_prog));
auto zero_prog = makeBoundaryProgram(build, boundary.report_at_0); auto zero_prog = makeBoundaryProgram(build, boundary.report_at_0);
out.reportZeroOffset = writeProgram(bc, move(zero_prog)); out.reportZeroOffset = writeProgram(bc, std::move(zero_prog));
auto zeod_prog = makeBoundaryProgram(build, dboundary.report_at_0_eod_full); auto zeod_prog = makeBoundaryProgram(build, dboundary.report_at_0_eod_full);
out.reportZeroEodOffset = writeProgram(bc, move(zeod_prog)); out.reportZeroEodOffset = writeProgram(bc, std::move(zeod_prog));
} }
static static
@ -2752,10 +2752,10 @@ RoseProgram makeFragmentProgram(const RoseBuildImpl &build, build_context &bc,
for (const auto &lit_id : lit_ids) { for (const auto &lit_id : lit_ids) {
auto prog = makeLiteralProgram(build, bc, prog_build, lit_id, auto prog = makeLiteralProgram(build, bc, prog_build, lit_id,
lit_edge_map, false); lit_edge_map, false);
blocks.emplace_back(move(prog)); blocks.emplace_back(std::move(prog));
} }
return assembleProgramBlocks(move(blocks)); return assembleProgramBlocks(std::move(blocks));
} }
/** /**
@ -2865,7 +2865,7 @@ vector<LitFragment> groupByFragment(const RoseBuildImpl &build) {
auto &fi = m.second; auto &fi = m.second;
DEBUG_PRINTF("frag %s -> ids: %s\n", dumpString(m.first.s).c_str(), DEBUG_PRINTF("frag %s -> ids: %s\n", dumpString(m.first.s).c_str(),
as_string_list(fi.lit_ids).c_str()); as_string_list(fi.lit_ids).c_str());
fragments.emplace_back(frag_id, lit.s, fi.groups, move(fi.lit_ids)); fragments.emplace_back(frag_id, lit.s, fi.groups, std::move(fi.lit_ids));
frag_id++; frag_id++;
assert(frag_id == fragments.size()); assert(frag_id == fragments.size());
} }
@ -2981,7 +2981,7 @@ void buildFragmentPrograms(const RoseBuildImpl &build,
child_offset); child_offset);
addIncludedJumpProgram(lit_prog, child_offset, pfrag.squash); addIncludedJumpProgram(lit_prog, child_offset, pfrag.squash);
} }
pfrag.lit_program_offset = writeProgram(bc, move(lit_prog)); pfrag.lit_program_offset = writeProgram(bc, std::move(lit_prog));
// We only do delayed rebuild in streaming mode. // We only do delayed rebuild in streaming mode.
if (!build.cc.streaming) { if (!build.cc.streaming) {
@ -3001,7 +3001,7 @@ void buildFragmentPrograms(const RoseBuildImpl &build,
addIncludedJumpProgram(rebuild_prog, child_offset, addIncludedJumpProgram(rebuild_prog, child_offset,
pfrag.delay_squash); pfrag.delay_squash);
} }
pfrag.delay_program_offset = writeProgram(bc, move(rebuild_prog)); pfrag.delay_program_offset = writeProgram(bc, std::move(rebuild_prog));
} }
} }
@ -3090,7 +3090,7 @@ pair<u32, u32> writeDelayPrograms(const RoseBuildImpl &build,
auto prog = makeLiteralProgram(build, bc, prog_build, auto prog = makeLiteralProgram(build, bc, prog_build,
delayed_lit_id, lit_edge_map, delayed_lit_id, lit_edge_map,
false); false);
u32 offset = writeProgram(bc, move(prog)); u32 offset = writeProgram(bc, std::move(prog));
u32 delay_id; u32 delay_id;
auto it = cache.find(offset); auto it = cache.find(offset);
@ -3150,7 +3150,7 @@ pair<u32, u32> writeAnchoredPrograms(const RoseBuildImpl &build,
auto prog = makeLiteralProgram(build, bc, prog_build, lit_id, auto prog = makeLiteralProgram(build, bc, prog_build, lit_id,
lit_edge_map, true); lit_edge_map, true);
u32 offset = writeProgram(bc, move(prog)); u32 offset = writeProgram(bc, std::move(prog));
DEBUG_PRINTF("lit_id=%u -> anch prog at %u\n", lit_id, offset); DEBUG_PRINTF("lit_id=%u -> anch prog at %u\n", lit_id, offset);
u32 anch_id; u32 anch_id;
@ -3210,7 +3210,7 @@ pair<u32, u32> buildReportPrograms(const RoseBuildImpl &build,
for (ReportID id : reports) { for (ReportID id : reports) {
auto program = makeReportProgram(build, bc.needs_mpv_catchup, id); auto program = makeReportProgram(build, bc.needs_mpv_catchup, id);
u32 offset = writeProgram(bc, move(program)); u32 offset = writeProgram(bc, std::move(program));
programs.emplace_back(offset); programs.emplace_back(offset);
build.rm.setProgramOffset(id, offset); build.rm.setProgramOffset(id, offset);
DEBUG_PRINTF("program for report %u @ %u (%zu instructions)\n", id, DEBUG_PRINTF("program for report %u @ %u (%zu instructions)\n", id,
@ -3326,7 +3326,7 @@ void addEodEventProgram(const RoseBuildImpl &build, build_context &bc,
bc.roleStateIndices, prog_build, bc.roleStateIndices, prog_build,
build.eod_event_literal_id, edge_list, build.eod_event_literal_id, edge_list,
false); false);
program.add_block(move(block)); program.add_block(std::move(block));
} }
static static
@ -3715,7 +3715,7 @@ bytecode_ptr<RoseEngine> RoseBuildImpl::buildFinalEngine(u32 minWidth) {
drproto.get(), eproto.get(), sbproto.get()); drproto.get(), eproto.get(), sbproto.get());
auto eod_prog = makeEodProgram(*this, bc, prog_build, eodNfaIterOffset); auto eod_prog = makeEodProgram(*this, bc, prog_build, eodNfaIterOffset);
proto.eodProgramOffset = writeProgram(bc, move(eod_prog)); proto.eodProgramOffset = writeProgram(bc, std::move(eod_prog));
size_t longLitStreamStateRequired = 0; size_t longLitStreamStateRequired = 0;
proto.longLitTableOffset proto.longLitTableOffset
@ -3734,11 +3734,11 @@ bytecode_ptr<RoseEngine> RoseBuildImpl::buildFinalEngine(u32 minWidth) {
writeLogicalInfo(rm, bc.engine_blob, proto); writeLogicalInfo(rm, bc.engine_blob, proto);
auto flushComb_prog = makeFlushCombProgram(proto); auto flushComb_prog = makeFlushCombProgram(proto);
proto.flushCombProgramOffset = writeProgram(bc, move(flushComb_prog)); proto.flushCombProgramOffset = writeProgram(bc, std::move(flushComb_prog));
auto lastFlushComb_prog = makeLastFlushCombProgram(proto); auto lastFlushComb_prog = makeLastFlushCombProgram(proto);
proto.lastFlushCombProgramOffset = proto.lastFlushCombProgramOffset =
writeProgram(bc, move(lastFlushComb_prog)); writeProgram(bc, std::move(lastFlushComb_prog));
// Build anchored matcher. // Build anchored matcher.
auto atable = buildAnchoredMatcher(*this, fragments, anchored_dfas); auto atable = buildAnchoredMatcher(*this, fragments, anchored_dfas);
@ -3882,7 +3882,7 @@ bytecode_ptr<RoseEngine> RoseBuildImpl::buildFinalEngine(u32 minWidth) {
bc.engine_blob.write_bytes(engine.get()); bc.engine_blob.write_bytes(engine.get());
// Add a small write engine if appropriate. // Add a small write engine if appropriate.
engine = addSmallWriteEngine(*this, bc.resources, move(engine)); engine = addSmallWriteEngine(*this, bc.resources, std::move(engine));
DEBUG_PRINTF("rose done %p\n", engine.get()); DEBUG_PRINTF("rose done %p\n", engine.get());

View File

@ -1782,7 +1782,7 @@ bytecode_ptr<RoseEngine> RoseBuildImpl::buildRose(u32 minWidth) {
/* transfer mpv outfix to main queue */ /* transfer mpv outfix to main queue */
if (mpv_outfix) { if (mpv_outfix) {
outfixes.emplace_back(move(*mpv_outfix)); outfixes.emplace_back(std::move(*mpv_outfix));
mpv_outfix = nullptr; mpv_outfix = nullptr;
} }

View File

@ -212,7 +212,7 @@ void convertFloodProneSuffix(RoseBuildImpl &tbi, RoseVertex v, u32 lit_id,
// Apply the NFA. // Apply the NFA.
assert(!g[v].suffix); assert(!g[v].suffix);
g[v].suffix.graph = move(h); g[v].suffix.graph = std::move(h);
g[v].reports.clear(); g[v].reports.clear();
// Swap v's literal for a shorter one. // Swap v's literal for a shorter one.

View File

@ -464,7 +464,7 @@ void findFloodReach(const RoseBuildImpl &tbi, const RoseVertex v,
namespace { namespace {
struct LookProto { struct LookProto {
LookProto(s32 offset_in, CharReach reach_in) LookProto(s32 offset_in, CharReach reach_in)
: offset(offset_in), reach(move(reach_in)) {} : offset(offset_in), reach(std::move(reach_in)) {}
s32 offset; s32 offset;
CharReach reach; CharReach reach;
}; };

View File

@ -738,7 +738,7 @@ void addFragmentLiteral(const RoseBuildImpl &build, MatcherProto &mp,
const auto &groups = f.groups; const auto &groups = f.groups;
mp.lits.emplace_back(move(s_final), nocase, noruns, f.fragment_id, mp.lits.emplace_back(std::move(s_final), nocase, noruns, f.fragment_id,
groups, msk, cmp); groups, msk, cmp);
} }
@ -936,7 +936,7 @@ buildFloatingMatcherProto(const RoseBuildImpl &build,
throw CompileError("Unable to generate literal matcher proto."); throw CompileError("Unable to generate literal matcher proto.");
} }
return std::make_unique<LitProto>(move(proto), mp.accel_lits); return std::make_unique<LitProto>(std::move(proto), mp.accel_lits);
} }
unique_ptr<LitProto> unique_ptr<LitProto>
@ -964,7 +964,7 @@ buildDelayRebuildMatcherProto(const RoseBuildImpl &build,
throw CompileError("Unable to generate literal matcher proto."); throw CompileError("Unable to generate literal matcher proto.");
} }
return std::make_unique<LitProto>(move(proto), mp.accel_lits); return std::make_unique<LitProto>(std::move(proto), mp.accel_lits);
} }
unique_ptr<LitProto> unique_ptr<LitProto>
@ -1021,7 +1021,7 @@ buildSmallBlockMatcherProto(const RoseBuildImpl &build,
throw CompileError("Unable to generate literal matcher proto."); throw CompileError("Unable to generate literal matcher proto.");
} }
return std::make_unique<LitProto>(move(proto), mp.accel_lits); return std::make_unique<LitProto>(std::move(proto), mp.accel_lits);
} }
unique_ptr<LitProto> unique_ptr<LitProto>
@ -1046,7 +1046,7 @@ buildEodAnchoredMatcherProto(const RoseBuildImpl &build,
throw CompileError("Unable to generate literal matcher proto."); throw CompileError("Unable to generate literal matcher proto.");
} }
return std::make_unique<LitProto>(move(proto), mp.accel_lits); return std::make_unique<LitProto>(std::move(proto), mp.accel_lits);
} }
} // namespace ue2 } // namespace ue2

View File

@ -1442,7 +1442,7 @@ void mergeLeftfixesVariableLag(RoseBuildImpl &build) {
vector<vector<left_id>> chunks; vector<vector<left_id>> chunks;
for (auto &raw_group : engine_groups | map_values) { for (auto &raw_group : engine_groups | map_values) {
chunk(move(raw_group), &chunks, MERGE_GROUP_SIZE_MAX); chunk(std::move(raw_group), &chunks, MERGE_GROUP_SIZE_MAX);
} }
engine_groups.clear(); engine_groups.clear();
@ -1511,7 +1511,7 @@ namespace {
struct DedupeLeftKey { struct DedupeLeftKey {
DedupeLeftKey(const RoseBuildImpl &build, DedupeLeftKey(const RoseBuildImpl &build,
flat_set<pair<size_t, u32>> preds_in, const left_id &left) flat_set<pair<size_t, u32>> preds_in, const left_id &left)
: left_hash(hashLeftfix(left)), preds(move(preds_in)), : left_hash(hashLeftfix(left)), preds(std::move(preds_in)),
transient(contains(build.transient, left)) { transient(contains(build.transient, left)) {
} }
@ -1599,7 +1599,7 @@ void dedupeLeftfixesVariableLag(RoseBuildImpl &build) {
continue; continue;
} }
} }
engine_groups[DedupeLeftKey(build, move(preds), left)].emplace_back(left); engine_groups[DedupeLeftKey(build, std::move(preds), left)].emplace_back(left);
} }
/* We don't bother chunking as we expect deduping to be successful if the /* We don't bother chunking as we expect deduping to be successful if the
@ -2048,7 +2048,7 @@ void mergeCastleLeftfixes(RoseBuildImpl &build) {
vector<vector<left_id>> chunks; vector<vector<left_id>> chunks;
for (auto &raw_group : by_reach | map_values) { for (auto &raw_group : by_reach | map_values) {
chunk(move(raw_group), &chunks, MERGE_CASTLE_GROUP_SIZE_MAX); chunk(std::move(raw_group), &chunks, MERGE_CASTLE_GROUP_SIZE_MAX);
} }
by_reach.clear(); by_reach.clear();
@ -2429,7 +2429,7 @@ void pairwiseDfaMerge(vector<RawDfa *> &dfas,
RawDfa *dfa_ptr = rdfa.get(); RawDfa *dfa_ptr = rdfa.get();
dfa_mapping[dfa_ptr] = dfa_mapping[*it]; dfa_mapping[dfa_ptr] = dfa_mapping[*it];
dfa_mapping.erase(*it); dfa_mapping.erase(*it);
winner.proto = move(rdfa); winner.proto = std::move(rdfa);
mergeOutfixInfo(winner, victim); mergeOutfixInfo(winner, victim);
@ -2546,7 +2546,7 @@ void mergeOutfixCombo(RoseBuildImpl &tbi, const ReportManager &rm,
// Transform this outfix into a DFA and add it to the merge set. // Transform this outfix into a DFA and add it to the merge set.
dfa_mapping[rdfa.get()] = it - tbi.outfixes.begin(); dfa_mapping[rdfa.get()] = it - tbi.outfixes.begin();
dfas.emplace_back(rdfa.get()); dfas.emplace_back(rdfa.get());
outfix.proto = move(rdfa); outfix.proto = std::move(rdfa);
new_dfas++; new_dfas++;
} }
} }

View File

@ -135,7 +135,7 @@ RoseProgram::iterator RoseProgram::insert(RoseProgram::iterator it,
assert(it != end()); assert(it != end());
assert(prog.back()->code() == ROSE_INSTR_END); assert(prog.back()->code() == ROSE_INSTR_END);
return prog.insert(it, move(ri)); return prog.insert(it, std::move(ri));
} }
RoseProgram::iterator RoseProgram::insert(RoseProgram::iterator it, RoseProgram::iterator RoseProgram::insert(RoseProgram::iterator it,
@ -183,7 +183,7 @@ void RoseProgram::add_before_end(RoseProgram &&block) {
return; return;
} }
insert(prev(prog.end()), move(block)); insert(prev(prog.end()), std::move(block));
} }
void RoseProgram::add_block(RoseProgram &&block) { void RoseProgram::add_block(RoseProgram &&block) {
@ -209,7 +209,7 @@ void RoseProgram::replace(Iter it, std::unique_ptr<RoseInstruction> ri) {
assert(!prog.empty()); assert(!prog.empty());
const RoseInstruction *old_ptr = it->get(); const RoseInstruction *old_ptr = it->get();
*it = move(ri); *it = std::move(ri);
update_targets(prog.begin(), prog.end(), old_ptr, it->get()); update_targets(prog.begin(), prog.end(), old_ptr, it->get());
} }
@ -307,19 +307,19 @@ void addEnginesEodProgram(u32 eodNfaIterOffset, RoseProgram &program) {
RoseProgram block; RoseProgram block;
block.add_before_end(std::make_unique<RoseInstrEnginesEod>(eodNfaIterOffset)); block.add_before_end(std::make_unique<RoseInstrEnginesEod>(eodNfaIterOffset));
program.add_block(move(block)); program.add_block(std::move(block));
} }
void addSuffixesEodProgram(RoseProgram &program) { void addSuffixesEodProgram(RoseProgram &program) {
RoseProgram block; RoseProgram block;
block.add_before_end(std::make_unique<RoseInstrSuffixesEod>()); block.add_before_end(std::make_unique<RoseInstrSuffixesEod>());
program.add_block(move(block)); program.add_block(std::move(block));
} }
void addMatcherEodProgram(RoseProgram &program) { void addMatcherEodProgram(RoseProgram &program) {
RoseProgram block; RoseProgram block;
block.add_before_end(std::make_unique<RoseInstrMatcherEod>()); block.add_before_end(std::make_unique<RoseInstrMatcherEod>());
program.add_block(move(block)); program.add_block(std::move(block));
} }
void addFlushCombinationProgram(RoseProgram &program) { void addFlushCombinationProgram(RoseProgram &program) {
@ -359,7 +359,7 @@ void makeRoleCheckLeftfix(const RoseBuildImpl &build,
build.g[v].left.leftfix_report, build.g[v].left.leftfix_report,
end_inst); end_inst);
} }
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
} }
static static
@ -394,7 +394,7 @@ void makeAnchoredLiteralDelay(const RoseBuildImpl &build,
const auto *end_inst = program.end_instruction(); const auto *end_inst = program.end_instruction();
auto ri = std::make_unique<RoseInstrAnchoredDelay>(groups, anch_id, end_inst); auto ri = std::make_unique<RoseInstrAnchoredDelay>(groups, anch_id, end_inst);
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
} }
static static
@ -404,7 +404,7 @@ void makeDedupe(const ReportManager &rm, const Report &report,
auto ri = auto ri =
std::make_unique<RoseInstrDedupe>(report.quashSom, rm.getDkey(report), std::make_unique<RoseInstrDedupe>(report.quashSom, rm.getDkey(report),
report.offsetAdjust, end_inst); report.offsetAdjust, end_inst);
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
} }
static static
@ -414,7 +414,7 @@ void makeDedupeSom(const ReportManager &rm, const Report &report,
auto ri = std::make_unique<RoseInstrDedupeSom>(report.quashSom, auto ri = std::make_unique<RoseInstrDedupeSom>(report.quashSom,
rm.getDkey(report), rm.getDkey(report),
report.offsetAdjust, end_inst); report.offsetAdjust, end_inst);
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
} }
static static
@ -522,11 +522,11 @@ void addLogicalSetRequired(const Report &report, ReportManager &rm,
// set matching status of current lkey // set matching status of current lkey
auto risl = std::make_unique<RoseInstrSetLogical>(report.lkey, auto risl = std::make_unique<RoseInstrSetLogical>(report.lkey,
report.offsetAdjust); report.offsetAdjust);
program.add_before_end(move(risl)); program.add_before_end(std::move(risl));
// set current lkey's corresponding ckeys active, pending to check // set current lkey's corresponding ckeys active, pending to check
for (auto ckey : rm.getRelateCKeys(report.lkey)) { for (auto ckey : rm.getRelateCKeys(report.lkey)) {
auto risc = std::make_unique<RoseInstrSetCombination>(ckey); auto risc = std::make_unique<RoseInstrSetCombination>(ckey);
program.add_before_end(move(risc)); program.add_before_end(std::move(risc));
} }
} }
@ -543,14 +543,14 @@ void makeReport(const RoseBuildImpl &build, const ReportID id,
if (report.minOffset > 0 || report.maxOffset < MAX_OFFSET) { if (report.minOffset > 0 || report.maxOffset < MAX_OFFSET) {
auto ri = std::make_unique<RoseInstrCheckBounds>(report.minOffset, auto ri = std::make_unique<RoseInstrCheckBounds>(report.minOffset,
report.maxOffset, end_inst); report.maxOffset, end_inst);
report_block.add_before_end(move(ri)); report_block.add_before_end(std::move(ri));
} }
// If this report has an exhaustion key, we can check it in the program // If this report has an exhaustion key, we can check it in the program
// rather than waiting until we're in the callback adaptor. // rather than waiting until we're in the callback adaptor.
if (report.ekey != INVALID_EKEY) { if (report.ekey != INVALID_EKEY) {
auto ri = std::make_unique<RoseInstrCheckExhausted>(report.ekey, end_inst); auto ri = std::make_unique<RoseInstrCheckExhausted>(report.ekey, end_inst);
report_block.add_before_end(move(ri)); report_block.add_before_end(std::move(ri));
} }
// External SOM reports that aren't passthrough need their SOM value // External SOM reports that aren't passthrough need their SOM value
@ -559,7 +559,7 @@ void makeReport(const RoseBuildImpl &build, const ReportID id,
report.type != EXTERNAL_CALLBACK_SOM_PASS) { report.type != EXTERNAL_CALLBACK_SOM_PASS) {
auto ri = std::make_unique<RoseInstrSomFromReport>(); auto ri = std::make_unique<RoseInstrSomFromReport>();
writeSomOperation(report, &ri->som); writeSomOperation(report, &ri->som);
report_block.add_before_end(move(ri)); report_block.add_before_end(std::move(ri));
} }
// Min length constraint. // Min length constraint.
@ -567,7 +567,7 @@ void makeReport(const RoseBuildImpl &build, const ReportID id,
assert(build.hasSom); assert(build.hasSom);
auto ri = std::make_unique<RoseInstrCheckMinLength>( auto ri = std::make_unique<RoseInstrCheckMinLength>(
report.offsetAdjust, report.minLength, end_inst); report.offsetAdjust, report.minLength, end_inst);
report_block.add_before_end(move(ri)); report_block.add_before_end(std::move(ri));
} }
if (report.quashSom) { if (report.quashSom) {
@ -650,11 +650,11 @@ void makeReport(const RoseBuildImpl &build, const ReportID id,
if (has_som) { if (has_som) {
auto ri = std::make_unique<RoseInstrReportSomAware>(); auto ri = std::make_unique<RoseInstrReportSomAware>();
writeSomOperation(report, &ri->som); writeSomOperation(report, &ri->som);
report_block.add_before_end(move(ri)); report_block.add_before_end(std::move(ri));
} else { } else {
auto ri = std::make_unique<RoseInstrReportSomInt>(); auto ri = std::make_unique<RoseInstrReportSomInt>();
writeSomOperation(report, &ri->som); writeSomOperation(report, &ri->som);
report_block.add_before_end(move(ri)); report_block.add_before_end(std::move(ri));
} }
break; break;
case INTERNAL_ROSE_CHAIN: { case INTERNAL_ROSE_CHAIN: {
@ -715,7 +715,7 @@ void makeReport(const RoseBuildImpl &build, const ReportID id,
throw CompileError("Unable to generate bytecode."); throw CompileError("Unable to generate bytecode.");
} }
program.add_block(move(report_block)); program.add_block(std::move(report_block));
} }
static static
@ -745,7 +745,7 @@ void makeRoleReports(const RoseBuildImpl &build,
for (ReportID id : g[v].reports) { for (ReportID id : g[v].reports) {
makeReport(build, id, report_som, report_block); makeReport(build, id, report_som, report_block);
} }
program.add_before_end(move(report_block)); program.add_before_end(std::move(report_block));
} }
static static
@ -816,7 +816,7 @@ void makeCheckLiteralInstruction(const rose_literal_id &lit,
ri = std::make_unique<RoseInstrCheckMedLit>(lit.s.get_string(), ri = std::make_unique<RoseInstrCheckMedLit>(lit.s.get_string(),
end_inst); end_inst);
} }
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
return; return;
} }
@ -834,7 +834,7 @@ void makeCheckLiteralInstruction(const rose_literal_id &lit,
} else { } else {
ri = std::make_unique<RoseInstrCheckLongLit>(lit.s.get_string(), end_inst); ri = std::make_unique<RoseInstrCheckLongLit>(lit.s.get_string(), end_inst);
} }
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
} }
static static
@ -850,7 +850,7 @@ void makeRoleCheckNotHandled(ProgramBuild &prog_build, RoseVertex v,
const auto *end_inst = program.end_instruction(); const auto *end_inst = program.end_instruction();
auto ri = std::make_unique<RoseInstrCheckNotHandled>(handled_key, end_inst); auto ri = std::make_unique<RoseInstrCheckNotHandled>(handled_key, end_inst);
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
} }
static static
@ -979,7 +979,7 @@ bool makeRoleByte(const vector<LookEntry> &look, RoseProgram &program) {
const auto *end_inst = program.end_instruction(); const auto *end_inst = program.end_instruction();
auto ri = std::make_unique<RoseInstrCheckByte>(andmask_u8, cmpmask_u8, flip, auto ri = std::make_unique<RoseInstrCheckByte>(andmask_u8, cmpmask_u8, flip,
checkbyte_offset, end_inst); checkbyte_offset, end_inst);
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
return true; return true;
} }
return false; return false;
@ -1011,7 +1011,7 @@ bool makeRoleMask(const vector<LookEntry> &look, RoseProgram &program) {
const auto *end_inst = program.end_instruction(); const auto *end_inst = program.end_instruction();
auto ri = std::make_unique<RoseInstrCheckMask>(and_mask, cmp_mask, neg_mask, auto ri = std::make_unique<RoseInstrCheckMask>(and_mask, cmp_mask, neg_mask,
base_offset, end_inst); base_offset, end_inst);
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
return true; return true;
} }
return false; return false;
@ -1066,7 +1066,7 @@ bool makeRoleMask32(const vector<LookEntry> &look,
const auto *end_inst = program.end_instruction(); const auto *end_inst = program.end_instruction();
auto ri = std::make_unique<RoseInstrCheckMask32>(and_mask, cmp_mask, neg_mask, auto ri = std::make_unique<RoseInstrCheckMask32>(and_mask, cmp_mask, neg_mask,
base_offset, end_inst); base_offset, end_inst);
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
return true; return true;
} }
@ -1109,7 +1109,7 @@ bool makeRoleMask64(const vector<LookEntry> &look,
const auto *end_inst = program.end_instruction(); const auto *end_inst = program.end_instruction();
auto ri = std::make_unique<RoseInstrCheckMask64>(and_mask, cmp_mask, neg_mask, auto ri = std::make_unique<RoseInstrCheckMask64>(and_mask, cmp_mask, neg_mask,
base_offset, end_inst); base_offset, end_inst);
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
return true; return true;
} }
@ -1474,7 +1474,7 @@ bool makeRoleShufti(const vector<LookEntry> &look, RoseProgram &program,
} }
} }
assert(ri); assert(ri);
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
return true; return true;
} }
@ -1497,7 +1497,7 @@ void makeLookaroundInstruction(const vector<LookEntry> &look,
const CharReach &reach = look.begin()->reach; const CharReach &reach = look.begin()->reach;
auto ri = std::make_unique<RoseInstrCheckSingleLookaround>(offset, reach, auto ri = std::make_unique<RoseInstrCheckSingleLookaround>(offset, reach,
program.end_instruction()); program.end_instruction());
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
return; return;
} }
@ -1519,7 +1519,7 @@ void makeLookaroundInstruction(const vector<LookEntry> &look,
auto ri = std::make_unique<RoseInstrCheckLookaround>(look, auto ri = std::make_unique<RoseInstrCheckLookaround>(look,
program.end_instruction()); program.end_instruction());
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
} }
static static
@ -1774,7 +1774,7 @@ bool makeRoleMultipathShufti(const vector<vector<LookEntry>> &multi_look,
auto ri = std::make_unique<RoseInstrCheckMultipathShufti16x8> auto ri = std::make_unique<RoseInstrCheckMultipathShufti16x8>
(nib_mask, bucket_select_lo, data_select_mask, hi_bits_mask, (nib_mask, bucket_select_lo, data_select_mask, hi_bits_mask,
lo_bits_mask, neg_mask, base_offset, last_start, end_inst); lo_bits_mask, neg_mask, base_offset, last_start, end_inst);
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
} else if (multi_len == 32) { } else if (multi_len == 32) {
neg_mask &= 0xffffffff; neg_mask &= 0xffffffff;
assert(!(hi_bits_mask & ~0xffffffffULL)); assert(!(hi_bits_mask & ~0xffffffffULL));
@ -1784,20 +1784,20 @@ bool makeRoleMultipathShufti(const vector<vector<LookEntry>> &multi_look,
(hi_mask, lo_mask, bucket_select_lo, data_select_mask, (hi_mask, lo_mask, bucket_select_lo, data_select_mask,
hi_bits_mask, lo_bits_mask, neg_mask, base_offset, hi_bits_mask, lo_bits_mask, neg_mask, base_offset,
last_start, end_inst); last_start, end_inst);
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
} else { } else {
auto ri = std::make_unique<RoseInstrCheckMultipathShufti32x16> auto ri = std::make_unique<RoseInstrCheckMultipathShufti32x16>
(hi_mask, lo_mask, bucket_select_hi, bucket_select_lo, (hi_mask, lo_mask, bucket_select_hi, bucket_select_lo,
data_select_mask, hi_bits_mask, lo_bits_mask, neg_mask, data_select_mask, hi_bits_mask, lo_bits_mask, neg_mask,
base_offset, last_start, end_inst); base_offset, last_start, end_inst);
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
} }
} else { } else {
auto ri = std::make_unique<RoseInstrCheckMultipathShufti64> auto ri = std::make_unique<RoseInstrCheckMultipathShufti64>
(hi_mask, lo_mask, bucket_select_lo, data_select_mask, (hi_mask, lo_mask, bucket_select_lo, data_select_mask,
hi_bits_mask, lo_bits_mask, neg_mask, base_offset, hi_bits_mask, lo_bits_mask, neg_mask, base_offset,
last_start, end_inst); last_start, end_inst);
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
} }
return true; return true;
} }
@ -1865,10 +1865,10 @@ void makeRoleMultipathLookaround(const vector<vector<LookEntry>> &multi_look,
ordered_look.emplace_back(multi_entry); ordered_look.emplace_back(multi_entry);
} }
auto ri = std::make_unique<RoseInstrMultipathLookaround>(move(ordered_look), auto ri = std::make_unique<RoseInstrMultipathLookaround>(std::move(ordered_look),
last_start, start_mask, last_start, start_mask,
program.end_instruction()); program.end_instruction());
program.add_before_end(move(ri)); program.add_before_end(std::move(ri));
} }
static static
@ -1893,7 +1893,7 @@ void makeRoleLookaround(const RoseBuildImpl &build,
vector<LookEntry> look; vector<LookEntry> look;
vector<LookEntry> look_more; vector<LookEntry> look_more;
if (!looks.empty()) { if (!looks.empty()) {
look = move(looks.front()); look = std::move(looks.front());
} }
findLookaroundMasks(build, v, look_more); findLookaroundMasks(build, v, look_more);
mergeLookaround(look, look_more); mergeLookaround(look, look_more);
@ -2001,7 +2001,7 @@ void makeRoleInfixTriggers(const RoseBuildImpl &build,
triggers.emplace_back(g[e].rose_cancel_prev_top, lbi.queue, top); triggers.emplace_back(g[e].rose_cancel_prev_top, lbi.queue, top);
} }
addInfixTriggerInstructions(move(triggers), program); addInfixTriggerInstructions(std::move(triggers), program);
} }
@ -2063,7 +2063,7 @@ void makeRoleEagerEodReports(const RoseBuildImpl &build,
RoseProgram block; RoseProgram block;
makeRoleReports(build, leftfix_info, needs_catchup, makeRoleReports(build, leftfix_info, needs_catchup,
target(e, build.g), block); target(e, build.g), block);
eod_program.add_block(move(block)); eod_program.add_block(std::move(block));
} }
} }
@ -2077,7 +2077,7 @@ void makeRoleEagerEodReports(const RoseBuildImpl &build,
addCheckOnlyEodInstruction(program); addCheckOnlyEodInstruction(program);
} }
program.add_before_end(move(eod_program)); program.add_before_end(std::move(eod_program));
} }
/** Makes a program for a role/vertex given a specific pred/in_edge. */ /** Makes a program for a role/vertex given a specific pred/in_edge. */
@ -2124,33 +2124,33 @@ RoseProgram makeRoleProgram(const RoseBuildImpl &build,
RoseProgram reports_block; RoseProgram reports_block;
makeRoleReports(build, leftfix_info, prog_build.needs_catchup, v, makeRoleReports(build, leftfix_info, prog_build.needs_catchup, v,
reports_block); reports_block);
effects_block.add_block(move(reports_block)); effects_block.add_block(std::move(reports_block));
RoseProgram infix_block; RoseProgram infix_block;
makeRoleInfixTriggers(build, leftfix_info, engine_info_by_queue, v, makeRoleInfixTriggers(build, leftfix_info, engine_info_by_queue, v,
infix_block); infix_block);
effects_block.add_block(move(infix_block)); effects_block.add_block(std::move(infix_block));
// Note: SET_GROUPS instruction must be after infix triggers, as an infix // Note: SET_GROUPS instruction must be after infix triggers, as an infix
// going dead may switch off groups. // going dead may switch off groups.
RoseProgram groups_block; RoseProgram groups_block;
makeRoleGroups(build.g, prog_build, v, groups_block); makeRoleGroups(build.g, prog_build, v, groups_block);
effects_block.add_block(move(groups_block)); effects_block.add_block(std::move(groups_block));
RoseProgram suffix_block; RoseProgram suffix_block;
makeRoleSuffix(build, suffixes, engine_info_by_queue, v, suffix_block); makeRoleSuffix(build, suffixes, engine_info_by_queue, v, suffix_block);
effects_block.add_block(move(suffix_block)); effects_block.add_block(std::move(suffix_block));
RoseProgram state_block; RoseProgram state_block;
makeRoleSetState(roleStateIndices, v, state_block); makeRoleSetState(roleStateIndices, v, state_block);
effects_block.add_block(move(state_block)); effects_block.add_block(std::move(state_block));
// Note: EOD eager reports may generate a CHECK_ONLY_EOD instruction (if // Note: EOD eager reports may generate a CHECK_ONLY_EOD instruction (if
// the program doesn't have one already). // the program doesn't have one already).
RoseProgram eod_block; RoseProgram eod_block;
makeRoleEagerEodReports(build, leftfix_info, prog_build.needs_catchup, v, makeRoleEagerEodReports(build, leftfix_info, prog_build.needs_catchup, v,
eod_block); eod_block);
effects_block.add_block(move(eod_block)); effects_block.add_block(std::move(eod_block));
/* a 'ghost role' may do nothing if we know that its groups are already set /* a 'ghost role' may do nothing if we know that its groups are already set
* - in this case we can avoid producing a program at all. */ * - in this case we can avoid producing a program at all. */
@ -2158,7 +2158,7 @@ RoseProgram makeRoleProgram(const RoseBuildImpl &build,
return {}; return {};
} }
program.add_before_end(move(effects_block)); program.add_before_end(std::move(effects_block));
return program; return program;
} }
@ -2204,7 +2204,7 @@ RoseProgram assembleProgramBlocks(vector<RoseProgram> &&blocks_in) {
continue; continue;
} }
blocks.emplace_back(move(block)); blocks.emplace_back(std::move(block));
seen.emplace(blocks.back()); seen.emplace(blocks.back());
} }
@ -2219,10 +2219,10 @@ RoseProgram assembleProgramBlocks(vector<RoseProgram> &&blocks_in) {
if (!prog.empty() && reads_work_done_flag(block)) { if (!prog.empty() && reads_work_done_flag(block)) {
RoseProgram clear_block; RoseProgram clear_block;
clear_block.add_before_end(std::make_unique<RoseInstrClearWorkDone>()); clear_block.add_before_end(std::make_unique<RoseInstrClearWorkDone>());
prog.add_block(move(clear_block)); prog.add_block(std::move(clear_block));
} }
prog.add_block(move(block)); prog.add_block(std::move(block));
} }
return prog; return prog;
@ -2265,7 +2265,7 @@ RoseProgram makeLiteralProgram(const RoseBuildImpl &build,
engine_info_by_queue, roleStateIndices, engine_info_by_queue, roleStateIndices,
prog_build, e); prog_build, e);
if (!role_prog.empty()) { if (!role_prog.empty()) {
pred_blocks[pred_state].add_block(move(role_prog)); pred_blocks[pred_state].add_block(std::move(role_prog));
} }
} }
@ -2284,7 +2284,7 @@ RoseProgram makeLiteralProgram(const RoseBuildImpl &build,
auto role_prog = makeRoleProgram(build, leftfix_info, suffixes, auto role_prog = makeRoleProgram(build, leftfix_info, suffixes,
engine_info_by_queue, roleStateIndices, engine_info_by_queue, roleStateIndices,
prog_build, e); prog_build, e);
role_programs.add_block(move(role_prog)); role_programs.add_block(std::move(role_prog));
} }
if (lit_id == build.eod_event_literal_id) { if (lit_id == build.eod_event_literal_id) {
@ -2299,8 +2299,8 @@ RoseProgram makeLiteralProgram(const RoseBuildImpl &build,
// Literal may squash groups. // Literal may squash groups.
makeGroupSquashInstruction(build, lit_id, unconditional_block); makeGroupSquashInstruction(build, lit_id, unconditional_block);
role_programs.add_block(move(unconditional_block)); role_programs.add_block(std::move(unconditional_block));
lit_program.add_before_end(move(role_programs)); lit_program.add_before_end(std::move(role_programs));
return lit_program; return lit_program;
} }
@ -2331,10 +2331,10 @@ RoseProgram makeDelayRebuildProgram(const RoseBuildImpl &build,
makePushDelayedInstructions(build.literals, prog_build, makePushDelayedInstructions(build.literals, prog_build,
build.literal_info.at(lit_id).delayed_ids, build.literal_info.at(lit_id).delayed_ids,
prog); prog);
blocks.emplace_back(move(prog)); blocks.emplace_back(std::move(prog));
} }
return assembleProgramBlocks(move(blocks)); return assembleProgramBlocks(std::move(blocks));
} }
RoseProgram makeEodAnchorProgram(const RoseBuildImpl &build, RoseProgram makeEodAnchorProgram(const RoseBuildImpl &build,
@ -2361,7 +2361,7 @@ RoseProgram makeEodAnchorProgram(const RoseBuildImpl &build,
for (const auto &id : g[v].reports) { for (const auto &id : g[v].reports) {
makeReport(build, id, has_som, report_block); makeReport(build, id, has_som, report_block);
} }
program.add_before_end(move(report_block)); program.add_before_end(std::move(report_block));
return program; return program;
} }
@ -2413,7 +2413,7 @@ void addIncludedJumpProgram(RoseProgram &program, u32 child_offset,
RoseProgram block; RoseProgram block;
block.add_before_end(std::make_unique<RoseInstrIncludedJump>(child_offset, block.add_before_end(std::make_unique<RoseInstrIncludedJump>(child_offset,
squash)); squash));
program.add_block(move(block)); program.add_block(std::move(block));
} }
static static
@ -2423,7 +2423,7 @@ void addPredBlockSingle(u32 pred_state, RoseProgram &pred_block,
const auto *end_inst = pred_block.end_instruction(); const auto *end_inst = pred_block.end_instruction();
pred_block.insert(begin(pred_block), pred_block.insert(begin(pred_block),
std::make_unique<RoseInstrCheckState>(pred_state, end_inst)); std::make_unique<RoseInstrCheckState>(pred_state, end_inst));
program.add_block(move(pred_block)); program.add_block(std::move(pred_block));
} }
static static
@ -2438,7 +2438,7 @@ void addPredBlocksAny(map<u32, RoseProgram> &pred_blocks, u32 num_states,
const RoseInstruction *end_inst = sparse_program.end_instruction(); const RoseInstruction *end_inst = sparse_program.end_instruction();
auto ri = std::make_unique<RoseInstrSparseIterAny>(num_states, keys, end_inst); auto ri = std::make_unique<RoseInstrSparseIterAny>(num_states, keys, end_inst);
sparse_program.add_before_end(move(ri)); sparse_program.add_before_end(std::move(ri));
RoseProgram &block = pred_blocks.begin()->second; RoseProgram &block = pred_blocks.begin()->second;
@ -2446,8 +2446,8 @@ void addPredBlocksAny(map<u32, RoseProgram> &pred_blocks, u32 num_states,
* blocks are being collapsed together */ * blocks are being collapsed together */
stripCheckHandledInstruction(block); stripCheckHandledInstruction(block);
sparse_program.add_before_end(move(block)); sparse_program.add_before_end(std::move(block));
program.add_block(move(sparse_program)); program.add_block(std::move(sparse_program));
} }
static static
@ -2462,14 +2462,14 @@ void addPredBlocksMulti(map<u32, RoseProgram> &pred_blocks,
// BEGIN instruction. // BEGIN instruction.
auto ri_begin = std::make_unique<RoseInstrSparseIterBegin>(num_states, end_inst); auto ri_begin = std::make_unique<RoseInstrSparseIterBegin>(num_states, end_inst);
RoseInstrSparseIterBegin *begin_inst = ri_begin.get(); RoseInstrSparseIterBegin *begin_inst = ri_begin.get();
sparse_program.add_before_end(move(ri_begin)); sparse_program.add_before_end(std::move(ri_begin));
// NEXT instructions, one per pred program. // NEXT instructions, one per pred program.
u32 prev_key = pred_blocks.begin()->first; u32 prev_key = pred_blocks.begin()->first;
for (auto it = next(begin(pred_blocks)); it != end(pred_blocks); ++it) { for (auto it = next(begin(pred_blocks)); it != end(pred_blocks); ++it) {
auto ri = std::make_unique<RoseInstrSparseIterNext>(prev_key, begin_inst, auto ri = std::make_unique<RoseInstrSparseIterNext>(prev_key, begin_inst,
end_inst); end_inst);
sparse_program.add_before_end(move(ri)); sparse_program.add_before_end(std::move(ri));
prev_key = it->first; prev_key = it->first;
} }
@ -2483,7 +2483,7 @@ void addPredBlocksMulti(map<u32, RoseProgram> &pred_blocks,
assert(dynamic_cast<const RoseInstrSparseIterBegin *>(out_it->get()) || assert(dynamic_cast<const RoseInstrSparseIterBegin *>(out_it->get()) ||
dynamic_cast<const RoseInstrSparseIterNext *>(out_it->get())); dynamic_cast<const RoseInstrSparseIterNext *>(out_it->get()));
out_it = sparse_program.insert(++out_it, move(flat_prog)); out_it = sparse_program.insert(++out_it, std::move(flat_prog));
// Jump table target for this key is the beginning of the block we just // Jump table target for this key is the beginning of the block we just
// spliced in. // spliced in.
@ -2495,9 +2495,9 @@ void addPredBlocksMulti(map<u32, RoseProgram> &pred_blocks,
} }
// Write the jump table back into the SPARSE_ITER_BEGIN instruction. // Write the jump table back into the SPARSE_ITER_BEGIN instruction.
begin_inst->jump_table = move(jump_table); begin_inst->jump_table = std::move(jump_table);
program.add_block(move(sparse_program)); program.add_block(std::move(sparse_program));
} }
void addPredBlocks(map<u32, RoseProgram> &pred_blocks, u32 num_states, void addPredBlocks(map<u32, RoseProgram> &pred_blocks, u32 num_states,

View File

@ -242,7 +242,7 @@ u32 SomSlotManager::numSomSlots() const {
u32 SomSlotManager::addRevNfa(bytecode_ptr<NFA> nfa, u32 maxWidth) { u32 SomSlotManager::addRevNfa(bytecode_ptr<NFA> nfa, u32 maxWidth) {
u32 rv = verify_u32(rev_nfas.size()); u32 rv = verify_u32(rev_nfas.size());
rev_nfas.emplace_back(move(nfa)); rev_nfas.emplace_back(std::move(nfa));
// A rev nfa commits us to having enough history around to handle its // A rev nfa commits us to having enough history around to handle its
// max width. // max width.

View File

@ -74,7 +74,7 @@ vector<u32> findCliqueGroup(CliqueGraph &cg) {
// Get the vertex to start from // Get the vertex to start from
vector<u32> clique; vector<u32> clique;
while (!gStack.empty()) { while (!gStack.empty()) {
vector<u32> g = move(gStack.top()); vector<u32> g = std::move(gStack.top());
gStack.pop(); gStack.pop();
// Choose a vertex from the graph // Choose a vertex from the graph

View File

@ -174,7 +174,7 @@ unique_ptr<EngineStream> EngineHyperscan::streamOpen(EngineContext &ectx,
return nullptr; return nullptr;
} }
stream->sn = streamId; stream->sn = streamId;
return move(stream); return std::move(stream);
} }
void EngineHyperscan::streamClose(unique_ptr<EngineStream> stream, void EngineHyperscan::streamClose(unique_ptr<EngineStream> stream,

View File

@ -111,7 +111,7 @@ public:
thread_barrier &tb_in, thread_func_t function_in, thread_barrier &tb_in, thread_func_t function_in,
vector<DataBlock> corpus_data_in) vector<DataBlock> corpus_data_in)
: num(num_in), results(repeats), engine(db_in), : num(num_in), results(repeats), engine(db_in),
enginectx(db_in.makeContext()), corpus_data(move(corpus_data_in)), enginectx(db_in.makeContext()), corpus_data(std::move(corpus_data_in)),
tb(tb_in), function(function_in) {} tb(tb_in), function(function_in) {}
// Start the thread. // Start the thread.
@ -219,7 +219,7 @@ void usage(const char *error) {
/** Wraps up a name and the set of signature IDs it refers to. */ /** Wraps up a name and the set of signature IDs it refers to. */
struct BenchmarkSigs { struct BenchmarkSigs {
BenchmarkSigs(string name_in, SignatureSet sigs_in) BenchmarkSigs(string name_in, SignatureSet sigs_in)
: name(move(name_in)), sigs(move(sigs_in)) {} : name(std::move(name_in)), sigs(std::move(sigs_in)) {}
string name; string name;
SignatureSet sigs; SignatureSet sigs;
}; };
@ -457,7 +457,7 @@ void processArgs(int argc, char *argv[], vector<BenchmarkSigs> &sigSets,
for (const auto &file : sigFiles) { for (const auto &file : sigFiles) {
SignatureSet sigs; SignatureSet sigs;
loadSignatureList(file, sigs); loadSignatureList(file, sigs);
sigSets.emplace_back(file, move(sigs)); sigSets.emplace_back(file, std::move(sigs));
} }
useLiteralApi = (bool)literalFlag; useLiteralApi = (bool)literalFlag;
@ -590,7 +590,7 @@ void benchStreamingInternal(ThreadContext *ctx, vector<StreamInfo> &streams,
// if this was the last block in the stream, close the stream handle // if this was the last block in the stream, close the stream handle
if (b.id == stream.last_block_id) { if (b.id == stream.last_block_id) {
e.streamClose(move(stream.eng_handle), r); e.streamClose(std::move(stream.eng_handle), r);
stream.eng_handle = nullptr; stream.eng_handle = nullptr;
} }
} }
@ -963,7 +963,7 @@ void runBenchmark(const Engine &db,
printf("Unable to start processing thread %u\n", i); printf("Unable to start processing thread %u\n", i);
exit(1); exit(1);
} }
threads.push_back(move(t)); threads.push_back(std::move(t));
} }
// Reap threads. // Reap threads.
@ -1011,7 +1011,7 @@ int HS_CDECL main(int argc, char *argv[]) {
for (auto i : exprMapTemplate | map_keys) { for (auto i : exprMapTemplate | map_keys) {
sigs.push_back(i); sigs.push_back(i);
} }
sigSets.emplace_back(exprPath, move(sigs)); sigSets.emplace_back(exprPath, std::move(sigs));
} }
// read in and process our corpus // read in and process our corpus