@@ -218,7 +218,7 @@ General Bitcoin Core
218
218
- * Rationale* : RPC allows for better automatic testing. The test suite for
219
219
the GUI is very limited
220
220
221
- - Make sure pulls pass Travis CI before merging
221
+ - Make sure pull requests pass Travis CI before merging
222
222
223
223
- * Rationale* : Makes sure that they pass thorough testing, and that the tester will keep passing
224
224
on the master branch. Otherwise all new pull requests will start failing the tests, resulting in
@@ -230,9 +230,9 @@ General Bitcoin Core
230
230
Wallet
231
231
-------
232
232
233
- - Make sure that that no crashes happen with run-time option ` -disablewallet ` .
233
+ - Make sure that no crashes happen with run-time option ` -disablewallet ` .
234
234
235
- - * Rationale* : In RPC code that conditionally use the wallet (such as
235
+ - * Rationale* : In RPC code that conditionally uses the wallet (such as
236
236
` validateaddress ` ) it is easy to forget that global pointer ` pwalletMain `
237
237
can be NULL. See ` qa/rpc-tests/disablewallet.py ` for functional tests
238
238
exercising the API with ` -disablewallet `
@@ -250,9 +250,9 @@ General C++
250
250
with assertions disabled, having side-effects in assertions is unexpected and
251
251
makes the code harder to understand
252
252
253
- - If you use the .h , you must link the .cpp
253
+ - If you use the ` .h ` , you must link the ` .cpp `
254
254
255
- - * Rationale* : Include files are the interface for the implementation file . Including one but
255
+ - * Rationale* : Include files define the interface for the code in implementation files . Including one but
256
256
not linking the other is confusing. Please avoid that. Moving functions from
257
257
the ` .h ` to the ` .cpp ` should not result in build errors
258
258
@@ -264,11 +264,11 @@ General C++
264
264
C++ data structures
265
265
--------------------
266
266
267
- - Never use the std::map [ ] syntax when reading from a map, but instead use .find()
267
+ - Never use the ` std::map [] ` syntax when reading from a map, but instead use ` .find() `
268
268
269
- - * Rationale* : [ ] does an insert (of the default element) if the item doesn't
269
+ - * Rationale* : ` [] ` does an insert (of the default element) if the item doesn't
270
270
exist in the map yet. This has resulted in memory leaks in the past, as well as
271
- race conditions (expecting read-read behavior). Using [ ] is fine for * writing* to a map
271
+ race conditions (expecting read-read behavior). Using ` [] ` is fine for * writing* to a map
272
272
273
273
- Do not compare an iterator from one data structure with an iterator of
274
274
another data structure (even if of the same type)
@@ -304,18 +304,18 @@ C++ data structures
304
304
Strings and formatting
305
305
------------------------
306
306
307
- - Be careful of LogPrint versus LogPrintf. LogPrint takes a ' category' argument, LogPrintf does not.
307
+ - Be careful of ` LogPrint ` versus ` LogPrintf ` . ` LogPrint ` takes a ` category ` argument, ` LogPrintf ` does not.
308
308
309
309
- * Rationale* : Confusion of these can result in runtime exceptions due to
310
310
formatting mismatch, and it is easy to get wrong because of subtly similar naming
311
311
312
- - Use std::string, avoid C string manipulation functions
312
+ - Use ` std::string ` , avoid C string manipulation functions
313
313
314
314
- * Rationale* : C++ string handling is marginally safer, less scope for
315
- buffer overflows and surprises with \0 characters. Also some C string manipulations
315
+ buffer overflows and surprises with ` \0 ` characters. Also some C string manipulations
316
316
tend to act differently depending on platform, or even the user locale
317
317
318
- - Use ParseInt32, ParseInt64, ParseDouble from ` utilstrencodings.h ` for number parsing
318
+ - Use ` ParseInt32 ` , ` ParseInt64 ` , ` ParseDouble ` from ` utilstrencodings.h ` for number parsing
319
319
320
320
- * Rationale* : These functions do overflow checking, and avoid pesky locale issues
321
321
0 commit comments