[Libreoffice-commits] online.git: wsd/Admin.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Tue Jan 9 03:13:49 UTC 2018
wsd/Admin.cpp | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
New commits:
commit b0fa4c33cd79f240064aa282eb88c5fd359905ea
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Mon Jan 8 22:09:33 2018 -0500
wsd: pass lambda args by value
These callbacks are executed on a different thread
and passing by ref is clearly invalid (and unintentional).
Change-Id: I02e5359594f912baf67028202e6262d74b5769eb
Reviewed-on: https://gerrit.libreoffice.org/47624
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp
index f6ade65f..29032057 100644
--- a/wsd/Admin.cpp
+++ b/wsd/Admin.cpp
@@ -430,24 +430,24 @@ void Admin::pollingThread()
}
void Admin::modificationAlert(const std::string& dockey, Poco::Process::PID pid, bool value){
- addCallback([&] { _model.modificationAlert(dockey, pid, value); });
+ addCallback([=] { _model.modificationAlert(dockey, pid, value); });
}
void Admin::addDoc(const std::string& docKey, Poco::Process::PID pid, const std::string& filename,
const std::string& sessionId, const std::string& userName, const std::string& userId)
{
- addCallback([&] { _model.addDocument(docKey, pid, filename, sessionId, userName, userId); });
+ addCallback([=] { _model.addDocument(docKey, pid, filename, sessionId, userName, userId); });
}
void Admin::rmDoc(const std::string& docKey, const std::string& sessionId)
{
- addCallback([&] { _model.removeDocument(docKey, sessionId); });
+ addCallback([=] { _model.removeDocument(docKey, sessionId); });
}
void Admin::rmDoc(const std::string& docKey)
{
LOG_INF("Removing complete doc [" << docKey << "] from Admin.");
- addCallback([&]{ _model.removeDocument(docKey); });
+ addCallback([=]{ _model.removeDocument(docKey); });
}
void Admin::rescheduleMemTimer(unsigned interval)
@@ -518,17 +518,17 @@ AdminModel& Admin::getModel()
void Admin::updateLastActivityTime(const std::string& docKey)
{
- addCallback([&]{ _model.updateLastActivityTime(docKey); });
+ addCallback([=]{ _model.updateLastActivityTime(docKey); });
}
void Admin::updateMemoryDirty(const std::string& docKey, int dirty)
{
- addCallback([&] { _model.updateMemoryDirty(docKey, dirty); });
+ addCallback([=] { _model.updateMemoryDirty(docKey, dirty); });
}
void Admin::addBytes(const std::string& docKey, uint64_t sent, uint64_t recv)
{
- addCallback([&] { _model.addBytes(docKey, sent, recv); });
+ addCallback([=] { _model.addBytes(docKey, sent, recv); });
}
void Admin::notifyForkit()
More information about the Libreoffice-commits
mailing list