Skip to content

Commit

Permalink
Using init statements
Browse files Browse the repository at this point in the history
  • Loading branch information
netromdk committed Mar 17, 2019
1 parent cba8b63 commit d2ef2bb
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions sigs.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,7 @@ class Signal<Ret(Args...)> final {
{
Lock lock(entriesMutex);
for (auto &entry : entries) {
auto conn = entry.conn();
if (conn) {
if (auto conn = entry.conn(); conn) {
conn->deleter = nullptr;
}
}
Expand Down Expand Up @@ -305,8 +304,7 @@ class Signal<Ret(Args...)> final {
{
Lock lock(entriesMutex);
for (auto &entry : entries) {
auto *sig = entry.signal();
if (sig) {
if (auto *sig = entry.signal(); sig) {
(*sig)(std::forward<Args>(args)...);
}
else {
Expand All @@ -322,8 +320,7 @@ class Signal<Ret(Args...)> final {

Lock lock(entriesMutex);
for (auto &entry : entries) {
auto *sig = entry.signal();
if (sig) {
if (auto *sig = entry.signal(); sig) {
(*sig)(retFunc, std::forward<Args>(args)...);
}
else {
Expand Down

0 comments on commit d2ef2bb

Please sign in to comment.