The following changes have been applied to src and lib folders:
regex replace: ([^"_])NULL ⇒ \1nullptr (8968 chgs in src, 1153 in lib)
Manually find/change: (void \*) nullptr ⇒ nullptr (1 case)
regex find: ".*?nullptr.*?"
Manually ~14 cases back to "NULL" in src, ~2 in lib
regex finds a few false positive where nullptr appears between two
strings in a function call
- Converted Compute message with imputed value to fmt::format style.
- Condensed most error-> output messages to oneliners where fmt::format
is called within the call to the error method. For a couple, the
formatting string/value list were complex enough that I continued using
a temporary string variable to make the code easier to read.
to the data vector rather than a vector parameter. Vectors are, as all
types are, passed by value in C++. Using a vector directly as a parameter
causes the data to be copied. Using a reference to the vector neatly
avoids that problem.
Also tucked fmt/format.h into its rightful place in the include list
since Axel says there's no absolute rule about it being an exception.
Corrected two issues in code identified by valgrind:
1) memory leaks (the subject of the original #1109) and
2) an invalid memory access (reading from beyond the end of an array).
Also:
- replaced several dynamically-allocated (calloc and free) local arrays with std::vector.
- reorganized include statements per new conventions, and
- updated messages to use strings and fmt.
Added folders and files used in manual testing and verification to examples folder.
No changes in analysis results are expected or intended. This is pure refactoring except for a bit of error message cleanup.