Skip to content

Commit 68c1c6c

Browse files
hebastovasild
andcommitted
clang-tidy: Fix readability-avoid-return-with-void-value check
See: https://clang.llvm.org/extra/clang-tidy/checks/readability/avoid-return-with-void-value.html Co-authored-by: Vasil Dimov <[email protected]>
1 parent 4abaa98 commit 68c1c6c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

include/mp/proxy-io.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class EventLoop
152152
template <typename Callable>
153153
void sync(Callable&& callable)
154154
{
155-
return post(std::ref(callable));
155+
post(std::ref(callable));
156156
}
157157

158158
//! Start asynchronous worker thread if necessary. This is only done if

src/mp/proxy.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ void EventLoop::loop()
221221
void EventLoop::post(const std::function<void()>& fn)
222222
{
223223
if (std::this_thread::get_id() == m_thread_id) {
224-
return fn();
224+
fn();
225+
return;
225226
}
226227
std::unique_lock<std::mutex> lock(m_mutex);
227228
m_cv.wait(lock, [this] { return m_post_fn == nullptr; });

0 commit comments

Comments
 (0)