mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -04:00
Instead of the new_intrusive<T>() functions, use intrusive(new T)
This means we no longer need 8 different functions for different numbers of arguments, and non-const references can now also be passed to constructors without problems. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1443 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -21,11 +21,11 @@ template <typename Key, typename Value>
|
||||
IndexMap<Key,Value>& DelayedIndexMaps<Key,Value>::get(const String& name, const vector<Key>& init_with) {
|
||||
intrusive_ptr<DelayedIndexMapsData<Key,Value> >& item = data[name];
|
||||
if (!item) { // no item, make a new one
|
||||
item = new_intrusive<DelayedIndexMapsData<Key,Value> >();
|
||||
item = intrusive(new DelayedIndexMapsData<Key,Value>);
|
||||
item->read_data.init(init_with);
|
||||
} else if (!item->unread_data.empty()) { // not read, read now
|
||||
item->read_data.init(init_with);
|
||||
Reader reader(new_shared1<wxStringInputStream>(item->unread_data), nullptr, _("delayed data for ") + name);
|
||||
Reader reader(shared(new wxStringInputStream(item->unread_data)), nullptr, _("delayed data for ") + name);
|
||||
reader.handle_greedy(item->read_data);
|
||||
item->unread_data.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user