mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Use make_intrusive/make_shared for smart pointer construction.
This commit is contained in:
@@ -203,9 +203,9 @@ void DropDownChoiceListBase::generateThumbnailImages() {
|
||||
status = THUMB_OK; // no need to rebuild
|
||||
} else if (img.isReady()) {
|
||||
// request this thumbnail
|
||||
thumbnail_thread.request( intrusive(new ChoiceThumbnailRequest(
|
||||
thumbnail_thread.request(make_intrusive<ChoiceThumbnailRequest>(
|
||||
&cve, i, status == THUMB_NOT_MADE && !img.local(), img.threadSafe()
|
||||
)));
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,5 +116,5 @@ void PackageChoiceValueEditor::change(const String& c) {
|
||||
|
||||
void PackageChoiceValueEditor::initDropDown() {
|
||||
if (drop_down) return;
|
||||
drop_down = shared(new DropDownPackageChoiceList(&editor(), this));
|
||||
drop_down = make_shared<DropDownPackageChoiceList>(&editor(), this);
|
||||
}
|
||||
|
||||
@@ -1367,7 +1367,7 @@ void TextValueEditor::findWordLists() {
|
||||
throw Error(_ERROR_1_("word list type not found", name));
|
||||
}
|
||||
// add to word_lists
|
||||
word_lists.push_back(intrusive(new WordListPos(pos, end, word_list)));
|
||||
word_lists.push_back(make_intrusive<WordListPos>(pos, end, word_list));
|
||||
// next
|
||||
pos = str.find(_("<word-list-"), end);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user