mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
Optimize container insertions using emplace_back instead of push_back
This commit is contained in:
parent
f25a425cb9
commit
e98fb9a1a7
9 changed files with 13 additions and 13 deletions
|
|
@ -408,9 +408,9 @@ void Hud::add(const HudElement& element) {
|
|||
if (document) {
|
||||
auto inventory = invview ? invview->getInventory() : nullptr;
|
||||
std::vector<Value> args;
|
||||
args.push_back(inventory ? inventory.get()->getId() : 0);
|
||||
args.emplace_back(inventory ? inventory.get()->getId() : 0);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
args.push_back(static_cast<integer_t>(blockPos[i]));
|
||||
args.emplace_back(static_cast<integer_t>(blockPos[i]));
|
||||
}
|
||||
scripting::on_ui_open(
|
||||
element.getDocument(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue