mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Quest API] Cleanup string copies and push_backs. (#2807)
# Notes - Several places use `push_back` instead of `emplace_back`. - Several places use `std::string` instead of `const std::string&`.
This commit is contained in:
@@ -135,13 +135,13 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
|
||||
EQ::ItemInstance *aug = tobe_auged->GetAugment(slot);
|
||||
if(aug) {
|
||||
std::vector<std::any> args;
|
||||
args.push_back(aug);
|
||||
args.emplace_back(aug);
|
||||
parse->EventItem(EVENT_AUGMENT_ITEM, user, tobe_auged, nullptr, "", slot, &args);
|
||||
|
||||
args.assign(1, tobe_auged);
|
||||
parse->EventItem(EVENT_AUGMENT_INSERT, user, aug, nullptr, "", slot, &args);
|
||||
|
||||
args.push_back(aug);
|
||||
args.emplace_back(aug);
|
||||
|
||||
const auto export_string = fmt::format(
|
||||
"{} {} {} {}",
|
||||
@@ -177,11 +177,11 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
|
||||
return;
|
||||
}
|
||||
std::vector<std::any> args;
|
||||
args.push_back(aug);
|
||||
args.emplace_back(aug);
|
||||
parse->EventItem(EVENT_UNAUGMENT_ITEM, user, tobe_auged, nullptr, "", slot, &args);
|
||||
|
||||
args.assign(1, tobe_auged);
|
||||
args.push_back(&is_solvent);
|
||||
args.emplace_back(&is_solvent);
|
||||
|
||||
parse->EventItem(EVENT_AUGMENT_REMOVE, user, aug, nullptr, "", slot, &args);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user