mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +03:00
use STL make_unique, remove wrapper header, breaks C++17 compilation
This commit is contained in:
@@ -31,7 +31,6 @@
|
||||
#include "cross_compile.h"
|
||||
#include "src/ue2common.h"
|
||||
#include "src/hs_compile.h"
|
||||
#include "src/util/make_unique.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
@@ -74,7 +73,7 @@ unique_ptr<hs_platform_info> xcompileReadMode(const char *s) {
|
||||
return nullptr;
|
||||
} else {
|
||||
DEBUG_PRINTF("cpu_features %llx\n", rv.cpu_features);
|
||||
return ue2::make_unique<hs_platform_info>(rv);
|
||||
return std::make_unique<hs_platform_info>(rv);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -41,7 +41,6 @@
|
||||
#include "ue2common.h"
|
||||
#include "util/container.h"
|
||||
#include "util/graph_range.h"
|
||||
#include "util/make_unique.h"
|
||||
#include "util/ue2string.h"
|
||||
#include "util/unicode_def.h"
|
||||
#include "util/unicode_set.h"
|
||||
@@ -141,7 +140,7 @@ void findPaths(const NGHolder &g, CorpusProperties &cProps,
|
||||
const size_t MAX_OPEN = min((size_t)1000, corpusLimit * 10);
|
||||
|
||||
vector<unique_ptr<VertexPath>> open;
|
||||
open.push_back(ue2::make_unique<VertexPath>(1, g.start));
|
||||
open.push_back(std::make_unique<VertexPath>(1, g.start));
|
||||
|
||||
unordered_set<NFAVertex> one_way_in;
|
||||
for (const auto &v : vertices_range(g)) {
|
||||
@@ -200,7 +199,7 @@ void findPaths(const NGHolder &g, CorpusProperties &cProps,
|
||||
if (boost::next(ai) == ae) {
|
||||
new_path = std::move(p);
|
||||
} else {
|
||||
new_path = make_unique<VertexPath>(*p);
|
||||
new_path = std::make_unique<VertexPath>(*p);
|
||||
}
|
||||
|
||||
new_path->push_back(v);
|
||||
@@ -714,8 +713,8 @@ unique_ptr<CorpusGenerator> makeCorpusGenerator(const NGHolder &graph,
|
||||
const ExpressionInfo &expr,
|
||||
CorpusProperties &props) {
|
||||
if (expr.utf8) {
|
||||
return ue2::make_unique<CorpusGeneratorUtf8>(graph, expr, props);
|
||||
return std::make_unique<CorpusGeneratorUtf8>(graph, expr, props);
|
||||
} else {
|
||||
return ue2::make_unique<CorpusGeneratorImpl>(graph, expr, props);
|
||||
return std::make_unique<CorpusGeneratorImpl>(graph, expr, props);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user