mirror of
https://github.com/hyprwm/hyprutils.git
synced 2025-12-20 07:00:10 +01:00
signal: reserve vector size to avoid reallocations
reserve the vector size to avoid reallocations.
This commit is contained in:
parent
781164dd7c
commit
1fc9436517
1 changed files with 1 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ using namespace Hyprutils::Memory;
|
|||
|
||||
void Hyprutils::Signal::CSignalBase::emitInternal(void* args) {
|
||||
std::vector<SP<CSignalListener>> listeners;
|
||||
listeners.reserve(m_vListeners.size());
|
||||
for (auto& l : m_vListeners) {
|
||||
if (l.expired())
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue