Revise lambda declarations

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2025-04-16 10:34:11 +02:00
parent 487f6fa922
commit 1b8053f95c
2 changed files with 5 additions and 5 deletions

View File

@ -45,7 +45,7 @@ namespace stdex
{
std::unique_lock<std::mutex> lk(m_mutex);
if (!space()) {
m_head_moved.wait(lk, [&]{return m_quit || space();});
m_head_moved.wait(lk, [&] {return m_quit || space();});
if (m_quit) _Unlikely_
return { nullptr, 0 };
}
@ -80,7 +80,7 @@ namespace stdex
{
std::unique_lock<std::mutex> lk(m_mutex);
if (empty()) {
m_tail_moved.wait(lk, [&]{return m_quit || !empty();});
m_tail_moved.wait(lk, [&] {return m_quit || !empty();});
if (m_quit && empty()) _Unlikely_
return { nullptr, 0 };
}
@ -126,7 +126,7 @@ namespace stdex
void sync()
{
std::unique_lock<std::mutex> lk(m_mutex);
m_head_moved.wait(lk, [&]{return m_quit || empty();});
m_head_moved.wait(lk, [&] {return m_quit || empty();});
}
protected:

View File

@ -2596,7 +2596,7 @@ namespace stdex
V_VT(&var_amount) = VT_I4;
V_I4(&var_amount) = (LONG)std::min<size_t>(to_read, LONG_MAX);
V_VT(&var_data) = VT_EMPTY;
HRESULT hr = [&]() {
HRESULT hr = [&] {
__try { return m_request->BinaryRead(&var_amount, &var_data); }
__except (EXCEPTION_EXECUTE_HANDLER) { return E_FAIL; }
}();
@ -2635,7 +2635,7 @@ namespace stdex
VARIANT var_data;
V_VT(&var_data) = VT_BSTR;
V_BSTR(&var_data) = bstr_data.get();
HRESULT hr = [&]() {
HRESULT hr = [&] {
__try { return m_response->BinaryWrite(var_data); }
__except (EXCEPTION_EXECUTE_HANDLER) { return E_FAIL; }
}();