Closed ObserverHerb closed 1 month ago
Apparently I didn't really understand how emplace works when I switched to it. Take advantage of forwarding parameters rather than creating the object and passing it in.
emplace
./bot.cpp:203: commands.try_emplace(alias,alias,&commands.at(name)); ./bot.cpp:328: redemptions.try_emplace(name,Command{ ./bot.cpp:701: tags.try_emplace(*key,*value); ./panes.cpp:342: lines.emplace_back(Line{text,1}); ./pulsar.cpp:67: dimensions.try_emplace(jsonFieldScene->toString(),QSize{jsonFieldDimensionsX->toInt(),jsonFieldDimensionsY->toInt()}); ./pulsar.cpp:87: if (triggers.try_emplace(name,jsonFieldSources->toArray()).second) ./pulsar.cpp:90: if (jsonFieldCommand != jsonObjectTrigger.end()) commandCrossReference.try_emplace(name,jsonFieldCommand->toString()); ./widgets.cpp:898: entries.try_emplace(entry->Name(),entry); ./widgets.cpp:931: entries.try_emplace(entry->Name(),entry); ./widgets.cpp:985: commands.try_emplace(name,Command{ ./widgets.cpp:1000: commands.try_emplace(alias,Command{
Apparently I didn't really understand how
emplace
works when I switched to it. Take advantage of forwarding parameters rather than creating the object and passing it in.