2 * Copyright (C) 2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
9 #include "EventLogManager.h"
17 CEventLog
& CEventLogManager::GetEventLog(unsigned int profileId
)
19 std::unique_lock
<CCriticalSection
> lock(m_eventMutex
);
21 auto eventLog
= m_eventLogs
.find(profileId
);
22 if (eventLog
== m_eventLogs
.end())
24 m_eventLogs
.insert(std::make_pair(profileId
, std::make_unique
<CEventLog
>()));
25 eventLog
= m_eventLogs
.find(profileId
);
28 return *eventLog
->second
;