SendableBase: remove unnecessary synchronization (#1797)

Also fixes the move constructor to update LiveWindow to follow the move.
This commit is contained in:
Oblarg
2019-08-03 02:47:17 -04:00
committed by Peter Johnson
parent e6d348f382
commit 3b12276bc3
5 changed files with 33 additions and 37 deletions

View File

@@ -81,9 +81,9 @@ void LiveWindow::AddChild(Sendable* parent, void* child) {
comp.telemetryEnabled = false;
}
void LiveWindow::Remove(Sendable* sendable) {
bool LiveWindow::Remove(Sendable* sendable) {
std::scoped_lock lock(m_impl->mutex);
m_impl->components.erase(sendable);
return m_impl->components.erase(sendable);
}
void LiveWindow::EnableTelemetry(Sendable* sendable) {