diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2011-04-06 18:58:22 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2011-04-06 18:58:22 -0700 |
commit | fcdc4ad086945f8a947c2ede2f87bc8d549bcae0 (patch) | |
tree | c5741ab4bfd5b8e3ffd9e0524d241cdcc63f5419 /src/cnode | |
parent | ff6dbf4361fe64ed00478e98f895d3bd15248869 (diff) | |
download | vyatta-cfg-fcdc4ad086945f8a947c2ede2f87bc8d549bcae0.tar.gz vyatta-cfg-fcdc4ad086945f8a947c2ede2f87bc8d549bcae0.zip |
minor refactoring
Diffstat (limited to 'src/cnode')
-rw-r--r-- | src/cnode/cnode-algorithm.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cnode/cnode-algorithm.cpp b/src/cnode/cnode-algorithm.cpp index 09534c8..7574e2e 100644 --- a/src/cnode/cnode-algorithm.cpp +++ b/src/cnode/cnode-algorithm.cpp @@ -62,12 +62,12 @@ _cmp_multi_values(const CfgNode *cfg1, const CfgNode *cfg2, { const vector<string>& ovec = cfg1->getValues(); const vector<string>& nvec = cfg2->getValues(); - Cstore::MapT<string, bool> nmap; + MapT<string, bool> nmap; bool changed = false; for (size_t i = 0; i < nvec.size(); i++) { nmap[nvec[i]] = true; } - Cstore::MapT<string, bool> omap; + MapT<string, bool> omap; for (size_t i = 0; i < ovec.size(); i++) { omap[ovec[i]] = true; if (nmap.find(ovec[i]) == nmap.end()) { @@ -119,8 +119,8 @@ _cmp_non_leaf_nodes(const CfgNode *cfg1, const CfgNode *cfg2, cnodes2 = cfg2->getChildNodes(); } - Cstore::MapT<string, bool> map; - Cstore::MapT<string, CfgNode *> nmap1, nmap2; + MapT<string, bool> map; + MapT<string, CfgNode *> nmap1, nmap2; for (size_t i = 0; i < cnodes1.size(); i++) { string key = (is_tag_node ? cnodes1[i]->getValue() : cnodes1[i]->getName()); @@ -135,15 +135,15 @@ _cmp_non_leaf_nodes(const CfgNode *cfg1, const CfgNode *cfg2, } vector<string> cnodes; - Cstore::MapT<string, bool>::iterator it = map.begin(); + MapT<string, bool>::iterator it = map.begin(); for (; it != map.end(); ++it) { cnodes.push_back((*it).first); } Cstore::sortNodes(cnodes); for (size_t i = 0; i < cnodes.size(); i++) { - Cstore::MapT<string, CfgNode *>::iterator p1 = nmap1.find(cnodes[i]); - Cstore::MapT<string, CfgNode *>::iterator p2 = nmap2.find(cnodes[i]); + MapT<string, CfgNode *>::iterator p1 = nmap1.find(cnodes[i]); + MapT<string, CfgNode *>::iterator p2 = nmap2.find(cnodes[i]); bool in1 = (p1 != nmap1.end()); bool in2 = (p2 != nmap2.end()); CfgNode *c1 = (in1 ? p1->second : NULL); |