Fix C++14 deprecated random_shuffle.
This commit is contained in:
parent
2ce86eddfa
commit
0145d9d514
|
|
@ -247,8 +247,8 @@ public:
|
||||||
}
|
}
|
||||||
void reverse() { std::reverse(m_deque.begin(), m_deque.end()); }
|
void reverse() { std::reverse(m_deque.begin(), m_deque.end()); }
|
||||||
void shuffle() {
|
void shuffle() {
|
||||||
std::random_shuffle(m_deque.begin(), m_deque.end(),
|
std::shuffle(m_deque.begin(), m_deque.end(),
|
||||||
[=](int) { return VL_RANDOM_I(32) % m_deque.size(); });
|
[=](int) { return VL_RANDOM_I(32) % m_deque.size(); });
|
||||||
}
|
}
|
||||||
VlQueue unique() const {
|
VlQueue unique() const {
|
||||||
VlQueue out;
|
VlQueue out;
|
||||||
|
|
|
||||||
|
|
@ -1211,10 +1211,9 @@ public:
|
||||||
, m_numSplit{0} {
|
, m_numSplit{0} {
|
||||||
// If you want ignore refs and walk the tne entire AST,
|
// If you want ignore refs and walk the tne entire AST,
|
||||||
// just call iterateChildren(m_modp) and split() for each module
|
// just call iterateChildren(m_modp) and split() for each module
|
||||||
for (SplitVarRefsMap::iterator it = refs.begin(), it_end = refs.end(); it != it_end;
|
for (auto& i : refs) {
|
||||||
++it) {
|
m_modp = i.first;
|
||||||
m_modp = it->first;
|
i.second.visit(this);
|
||||||
it->second.visit(this);
|
|
||||||
split();
|
split();
|
||||||
m_modp = nullptr;
|
m_modp = nullptr;
|
||||||
}
|
}
|
||||||
|
|
@ -1246,7 +1245,7 @@ public:
|
||||||
return reason;
|
return reason;
|
||||||
}
|
}
|
||||||
VL_DEBUG_FUNC; // Declare debug()
|
VL_DEBUG_FUNC; // Declare debug()
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* SplitVarImpl::cannotSplitPackedVarReason(const AstVar* varp) {
|
const char* SplitVarImpl::cannotSplitPackedVarReason(const AstVar* varp) {
|
||||||
return SplitPackedVarVisitor::cannotSplitReason(varp, true);
|
return SplitPackedVarVisitor::cannotSplitReason(varp, true);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue