mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-30 11:44:28 +03:00
use STL make_unique, remove wrapper header, breaks C++17 compilation
This commit is contained in:
@@ -50,7 +50,6 @@
|
||||
#include "util/dump_charclass.h"
|
||||
#include "util/flat_containers.h"
|
||||
#include "util/graph.h"
|
||||
#include "util/make_unique.h"
|
||||
#include "util/multibit_build.h"
|
||||
#include "util/report_manager.h"
|
||||
#include "util/verify_types.h"
|
||||
@@ -977,7 +976,7 @@ unique_ptr<NGHolder> makeHolder(const CastleProto &proto,
|
||||
}
|
||||
}
|
||||
|
||||
auto g = ue2::make_unique<NGHolder>(proto.kind);
|
||||
auto g = std::make_unique<NGHolder>(proto.kind);
|
||||
|
||||
for (const auto &m : proto.repeats) {
|
||||
addToHolder(*g, m.first, m.second);
|
||||
|
@@ -39,7 +39,6 @@
|
||||
#include "util/container.h"
|
||||
#include "util/flat_containers.h"
|
||||
#include "util/graph_range.h"
|
||||
#include "util/make_unique.h"
|
||||
#include "util/order_check.h"
|
||||
#include "util/report_manager.h"
|
||||
#include "util/verify_types.h"
|
||||
@@ -348,7 +347,7 @@ static never_inline
|
||||
unique_ptr<GoughGraph> makeCFG(const raw_som_dfa &raw) {
|
||||
vector<GoughVertex> vertices;
|
||||
vertices.reserve(raw.states.size());
|
||||
unique_ptr<GoughGraph> cfg = ue2::make_unique<GoughGraph>();
|
||||
unique_ptr<GoughGraph> cfg = std::make_unique<GoughGraph>();
|
||||
u32 min_state = !is_triggered(raw.kind);
|
||||
|
||||
if (min_state) {
|
||||
@@ -1235,7 +1234,7 @@ unique_ptr<raw_report_info> gough_build_strat::gatherReports(
|
||||
|
||||
const bool remap_reports = has_managed_reports(rdfa.kind);
|
||||
|
||||
auto ri = ue2::make_unique<raw_gough_report_info_impl>();
|
||||
auto ri = std::make_unique<raw_gough_report_info_impl>();
|
||||
map<raw_gough_report_list, u32> rev;
|
||||
|
||||
assert(!rdfa.states.empty());
|
||||
|
@@ -43,7 +43,6 @@
|
||||
#include "util/compare.h"
|
||||
#include "util/compile_context.h"
|
||||
#include "util/container.h"
|
||||
#include "util/make_unique.h"
|
||||
#include "util/order_check.h"
|
||||
#include "util/report_manager.h"
|
||||
#include "util/flat_containers.h"
|
||||
@@ -393,7 +392,7 @@ unique_ptr<raw_report_info> mcclellan_build_strat::gatherReports(
|
||||
|
||||
const bool remap_reports = has_managed_reports(rdfa.kind);
|
||||
|
||||
auto ri = ue2::make_unique<raw_report_info_impl>();
|
||||
auto ri = std::make_unique<raw_report_info_impl>();
|
||||
map<raw_report_list, u32> rev;
|
||||
|
||||
for (const dstate &s : rdfa.states) {
|
||||
|
@@ -48,7 +48,6 @@
|
||||
#include "util/flat_containers.h"
|
||||
#include "util/graph.h"
|
||||
#include "util/graph_range.h"
|
||||
#include "util/make_unique.h"
|
||||
#include "util/order_check.h"
|
||||
#include "util/report_manager.h"
|
||||
#include "util/unaligned.h"
|
||||
|
@@ -37,7 +37,6 @@
|
||||
#include "util/container.h"
|
||||
#include "util/determinise.h"
|
||||
#include "util/flat_containers.h"
|
||||
#include "util/make_unique.h"
|
||||
#include "util/report_manager.h"
|
||||
#include "util/unordered.h"
|
||||
|
||||
@@ -287,7 +286,7 @@ unique_ptr<raw_dfa> mergeTwoDfas(const raw_dfa *d1, const raw_dfa *d2,
|
||||
assert(d1->kind == d2->kind);
|
||||
assert(max_states <= MAX_DFA_STATES);
|
||||
|
||||
auto rdfa = ue2::make_unique<raw_dfa>(d1->kind);
|
||||
auto rdfa = std::make_unique<raw_dfa>(d1->kind);
|
||||
|
||||
Automaton_Merge autom(d1, d2, rm, grey);
|
||||
if (determinise(autom, rdfa->states, max_states)) {
|
||||
@@ -370,7 +369,7 @@ unique_ptr<raw_dfa> mergeAllDfas(const vector<const raw_dfa *> &dfas,
|
||||
assert(all_of(begin(dfas), end(dfas),
|
||||
[&kind](const raw_dfa *rdfa) { return rdfa->kind == kind; }));
|
||||
|
||||
auto rdfa = ue2::make_unique<raw_dfa>(kind);
|
||||
auto rdfa = std::make_unique<raw_dfa>(kind);
|
||||
Automaton_Merge n(dfas, rm, grey);
|
||||
|
||||
DEBUG_PRINTF("merging dfa\n");
|
||||
|
@@ -46,7 +46,6 @@
|
||||
#include "sheng_internal.h"
|
||||
#include "ue2common.h"
|
||||
#include "util/compile_context.h"
|
||||
#include "util/make_unique.h"
|
||||
#include "util/verify_types.h"
|
||||
#include "util/simd_types.h"
|
||||
|
||||
@@ -203,7 +202,7 @@ unique_ptr<raw_report_info> sheng_build_strat::gatherReports(
|
||||
|
||||
const bool remap_reports = has_managed_reports(rdfa.kind);
|
||||
|
||||
auto ri = ue2::make_unique<raw_report_info_impl>();
|
||||
auto ri = std::make_unique<raw_report_info_impl>();
|
||||
map<raw_report_list, u32> rev;
|
||||
|
||||
for (const dstate &s : rdfa.states) {
|
||||
|
Reference in New Issue
Block a user