@@ -59,12 +59,11 @@ namespace libp2p::multi {
59
59
X_PARITY_WS = 4770 ,
60
60
X_PARITY_WSS = 4780 ,
61
61
// Range for private use: 0x300000 – 0x3FFFFF
62
- # ifndef NDEBUG
62
+ // Debug section
63
63
_DUMMY_PROTO_1 = 0x3DEAD1 ,
64
64
_DUMMY_PROTO_2 = 0x3DEAD2 ,
65
65
_DUMMY_PROTO_3 = 0x3DEAD3 ,
66
66
_DUMMY_PROTO_4 = 0x3DEAD4 ,
67
- #endif
68
67
};
69
68
70
69
constexpr bool operator ==(const Protocol &p) const {
@@ -83,12 +82,9 @@ namespace libp2p::multi {
83
82
public:
84
83
/* *
85
84
* The total number of known protocols
85
+ * (31 ordinal + 4 debug)
86
86
*/
87
- static constexpr size_t kProtocolsNum = 31
88
- #ifndef NDEBUG
89
- + 4
90
- #endif
91
- ;
87
+ static constexpr size_t kProtocolsNum = 31 + 4 ;
92
88
93
89
/* *
94
90
* Returns a protocol with the corresponding name if it exists, or nullptr
@@ -165,12 +161,12 @@ namespace libp2p::multi {
165
161
{Protocol::Code::P2P_CIRCUIT, 0 , " p2p-circuit" },
166
162
{Protocol::Code::X_PARITY_WS, Protocol::kVarLen , " x-parity-ws" },
167
163
{Protocol::Code::X_PARITY_WSS, Protocol::kVarLen , " x-parity-wss" },
168
- # ifndef NDEBUG
164
+ // Debug section
169
165
{Protocol::Code::_DUMMY_PROTO_1, 0 , " _dummy_proto_1" },
170
166
{Protocol::Code::_DUMMY_PROTO_2, 0 , " _dummy_proto_2" },
171
167
{Protocol::Code::_DUMMY_PROTO_3, Protocol::kVarLen , " _dummy_proto_3" },
172
168
{Protocol::Code::_DUMMY_PROTO_4, Protocol::kVarLen , " _dummy_proto_4" },
173
- # endif
169
+
174
170
};
175
171
};
176
172
0 commit comments