mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
implemented 'default set style', so that doesn't have to be duplicated for each style
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@224 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -53,6 +53,15 @@ class IndexMap : private vector<Value> {
|
||||
init_object(key, (*this)[key->index]);
|
||||
}
|
||||
}
|
||||
/// Initialize this map with cloned values from another list
|
||||
void cloneFrom(const IndexMap<Key,Value>& values) {
|
||||
if (this->size() == values.size()) return;
|
||||
this->reserve(values.size());
|
||||
for(size_t index = size() ; index < values.size() ; ++index) {
|
||||
const Value& value = values[index];
|
||||
push_back(value ? value->clone() : value);
|
||||
}
|
||||
}
|
||||
/// Change this map by adding an additional key and value
|
||||
void add(const Key& key, const Value& value) {
|
||||
assert(get_key(value) == key);
|
||||
|
||||
Reference in New Issue
Block a user