mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
merge bitcoin#25292: Add LogPrintLevel to lint-format-strings, drop LogPrint-vs-LogPrintf section in dev notes
This commit is contained in:
parent
026409e4ff
commit
21470fdeb3
@ -862,11 +862,6 @@ int GetInt(Tabs tab)
|
||||
Strings and formatting
|
||||
------------------------
|
||||
|
||||
- Be careful of `LogPrint` versus `LogPrintf`. `LogPrint` takes a `category` argument, `LogPrintf` does not.
|
||||
|
||||
- *Rationale*: Confusion of these can result in runtime exceptions due to
|
||||
formatting mismatch, and it is easy to get wrong because of subtly similar naming.
|
||||
|
||||
- Use `std::string`, avoid C string manipulation functions.
|
||||
|
||||
- *Rationale*: C++ string handling is marginally safer, less scope for
|
||||
|
@ -17,6 +17,7 @@ FUNCTION_NAMES_AND_NUMBER_OF_LEADING_ARGUMENTS=(
|
||||
"LogConnectFailure,1"
|
||||
"LogPrint,1"
|
||||
"LogPrintf,0"
|
||||
"LogPrintLevel,2"
|
||||
"printf,0"
|
||||
"snprintf,2"
|
||||
"sprintf,1"
|
||||
|
Loading…
Reference in New Issue
Block a user