forked from github/verilator
Apply clang-format
This commit is contained in:
parent
6660627558
commit
47e7e21706
@ -386,16 +386,16 @@ string VName::dehash(const string& in) {
|
||||
|
||||
// Need to split 'in' into components separated by __DOT__, 'last_dot_pos'
|
||||
// keeps track of the position after the most recently found instance of __DOT__
|
||||
for (string::size_type last_dot_pos = 0; last_dot_pos < in.size(); ) {
|
||||
for (string::size_type last_dot_pos = 0; last_dot_pos < in.size();) {
|
||||
const string::size_type next_dot_pos = in.find("__DOT__", last_dot_pos);
|
||||
// Two iterators defining the range between the last and next dots.
|
||||
auto search_begin = std::begin(in) + last_dot_pos;
|
||||
auto search_end = next_dot_pos == string::npos ? std::end(in)
|
||||
: std::begin(in) + next_dot_pos;
|
||||
auto search_end
|
||||
= next_dot_pos == string::npos ? std::end(in) : std::begin(in) + next_dot_pos;
|
||||
|
||||
// Search for __Vhsh between the two dots.
|
||||
auto begin_vhsh = std::search(search_begin, search_end,
|
||||
std::begin(VHSH), std::end(VHSH) - 1);
|
||||
auto begin_vhsh
|
||||
= std::search(search_begin, search_end, std::begin(VHSH), std::end(VHSH) - 1);
|
||||
if (begin_vhsh != search_end) {
|
||||
std::string vhsh(begin_vhsh, search_end);
|
||||
const auto& it = s_dehashMap.find(vhsh);
|
||||
@ -417,9 +417,7 @@ string VName::dehash(const string& in) {
|
||||
|
||||
if (next_dot_pos != string::npos) {
|
||||
// Is there a __DOT__ to add to the dehashed version of 'in'?
|
||||
if (!dehashed.empty()) {
|
||||
dehashed += "__DOT__";
|
||||
}
|
||||
if (!dehashed.empty()) { dehashed += "__DOT__"; }
|
||||
last_dot_pos = next_dot_pos + DOT_LEN;
|
||||
} else {
|
||||
last_dot_pos = string::npos;
|
||||
|
Loading…
Reference in New Issue
Block a user