mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 04:56:20 +00:00
[Cleanup] Cleanup uses of insert/push_back when a temp object is used. (#3170)
This commit is contained in:
@@ -32,7 +32,7 @@ void command_dye(Client *c, const Seperator *sep)
|
||||
c->Message(Chat::White, "Red, Green, and Blue go from 0 to 255.");
|
||||
|
||||
for (const auto &slot : dye_slots) {
|
||||
slot_messages.push_back(fmt::format("({}) {}", slot_id, slot));
|
||||
slot_messages.emplace_back(fmt::format("({}) {}", slot_id, slot));
|
||||
slot_id++;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ void command_mysql(Client *c, const Seperator *sep)
|
||||
row_index < results.ColumnCount();
|
||||
row_index++
|
||||
) {
|
||||
lines.push_back(
|
||||
lines.emplace_back(
|
||||
fmt::format(
|
||||
"{} | {} ",
|
||||
results.FieldName(row_index),
|
||||
|
||||
@@ -35,7 +35,7 @@ void command_set_adventure_points(Client *c, const Seperator *sep)
|
||||
auto theme_id = Strings::ToUnsignedInt(sep->arg[1]);
|
||||
if (!EQ::ValueWithin(theme_id, LDoNThemes::Unused, LDoNThemes::TAK)) {
|
||||
c->Message(Chat::White, "Valid themes are as follows.");
|
||||
auto theme_map = EQ::constants::GetLDoNThemeMap();
|
||||
auto& theme_map = EQ::constants::GetLDoNThemeMap();
|
||||
for (const auto& theme : theme_map) {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
|
||||
@@ -16,7 +16,7 @@ void command_suspendmulti(Client *c, const Seperator *sep)
|
||||
const auto& n = Strings::Split(sep->arg[1], "|");
|
||||
std::vector<std::string> v;
|
||||
for (const auto& c : n) {
|
||||
v.push_back(fmt::format("'{}'", Strings::ToLower(c)));
|
||||
v.emplace_back(fmt::format("'{}'", Strings::ToLower(c)));
|
||||
}
|
||||
|
||||
auto days = Strings::ToUnsignedInt(sep->arg[2]);
|
||||
|
||||
Reference in New Issue
Block a user