mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-20 02:47:11 +03:00
util: switch from Boost to std::unordered set/map
This commit replaces the ue2::unordered_{set,map} types with their STL
versions, with some new hashing utilities in util/hash.h. The new types
ue2_unordered_set<T> and ue2_unordered_map<Key, T> default to using the
ue2_hasher.
The header util/ue2_containers.h has been removed, and the flat_set/map
containers moved to util/flat_containers.h.
This commit is contained in:
committed by
Matthew Barr
parent
a425bb9b7c
commit
9cf66b6ac9
@@ -176,7 +176,7 @@ public:
|
||||
: g(g_in), rm(&rm_in) {}
|
||||
|
||||
NFAWriter(const GraphT &g_in,
|
||||
const ue2::unordered_map<NFAVertex, u32> ®ion_map_in)
|
||||
const unordered_map<NFAVertex, u32> ®ion_map_in)
|
||||
: g(g_in), region_map(®ion_map_in) {}
|
||||
|
||||
void operator()(ostream& os, const VertexT& v) const {
|
||||
@@ -254,7 +254,7 @@ public:
|
||||
private:
|
||||
const GraphT &g;
|
||||
const ReportManager *rm = nullptr;
|
||||
const ue2::unordered_map<NFAVertex, u32> *region_map = nullptr;
|
||||
const unordered_map<NFAVertex, u32> *region_map = nullptr;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ void dumpGraphImpl(const char *name, const GraphT &g, const ReportManager &rm) {
|
||||
|
||||
template <typename GraphT>
|
||||
void dumpGraphImpl(const char *name, const GraphT &g,
|
||||
const ue2::unordered_map<NFAVertex, u32> ®ion_map) {
|
||||
const unordered_map<NFAVertex, u32> ®ion_map) {
|
||||
typedef typename boost::graph_traits<GraphT>::vertex_descriptor VertexT;
|
||||
typedef typename boost::graph_traits<GraphT>::edge_descriptor EdgeT;
|
||||
ofstream os(name);
|
||||
@@ -332,7 +332,7 @@ void dumpHolderImpl(const NGHolder &h, unsigned int stageNumber,
|
||||
}
|
||||
|
||||
void dumpHolderImpl(const NGHolder &h,
|
||||
const ue2::unordered_map<NFAVertex, u32> ®ion_map,
|
||||
const unordered_map<NFAVertex, u32> ®ion_map,
|
||||
unsigned int stageNumber, const char *stageName,
|
||||
const Grey &grey) {
|
||||
if (grey.dumpFlags & Grey::DUMP_INT_GRAPH) {
|
||||
|
||||
Reference in New Issue
Block a user