Skip to content

Commit eb1c5d0

Browse files
committed
[doc] Follow developer notes, add comment about missing default.
1 parent d5a57ce commit eb1c5d0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,7 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
18521852
case ConnectionType::ADDR_FETCH:
18531853
case ConnectionType::FEELER:
18541854
setConnected.insert(pnode->addr.GetGroup(addrman.m_asmap));
1855-
}
1855+
} // no default case, so the compiler can warn about missing cases
18561856
}
18571857
}
18581858

src/net.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ class CNode
874874
case ConnectionType::ADDR_FETCH:
875875
case ConnectionType::FEELER:
876876
return false;
877-
}
877+
} // no default case, so the compiler can warn about missing cases
878878

879879
assert(false);
880880
}
@@ -919,7 +919,7 @@ class CNode
919919
case ConnectionType::BLOCK_RELAY:
920920
case ConnectionType::ADDR_FETCH:
921921
return true;
922-
}
922+
} // no default case, so the compiler can warn about missing cases
923923

924924
assert(false);
925925
}

0 commit comments

Comments
 (0)