git-svn-id: svn://db.shs.com.ru/libs@109 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -103,6 +103,7 @@ void KSection::read(const void * ep) {
|
||||
|
||||
void KSection::update(KSection & v, bool keep_names) {
|
||||
PIMap<PIString, PIString> vk_ids;
|
||||
PISet<int> used;
|
||||
PIMap<int, KType>::iterator i;
|
||||
for (i = v.k.begin(); i != v.k.end(); ++i)
|
||||
vk_ids[i.value().name()] = i.value().formula();
|
||||
@@ -113,13 +114,25 @@ void KSection::update(KSection & v, bool keep_names) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (v.k.contains(i.key()))
|
||||
if (v.k.contains(i.key())) {
|
||||
k[i.key()].formula_ = v.k[i.key()].formula_;
|
||||
used << i.key();
|
||||
}
|
||||
}
|
||||
for (i = v.k.begin(); i != v.k.end(); ++i) {
|
||||
if (!used.contains(i.key()))
|
||||
k[i.key()] = i.value();
|
||||
}
|
||||
used.clear();
|
||||
PIMap<int, KSection>::iterator j;
|
||||
for (j = s.begin(); j != s.end(); ++j) {
|
||||
if (v.s.contains(j.key()))
|
||||
j.value().update(v.s[j.key()], keep_names);
|
||||
used << j.key();
|
||||
}
|
||||
for (j = v.s.begin(); j != v.s.end(); ++j) {
|
||||
if (!used.contains(j.key()))
|
||||
s[j.key()] = j.value();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user