Give clearer names to template parameters

This commit is contained in:
Rangi
2025-10-08 14:52:34 -04:00
parent 711fba5e35
commit 23b9039716
13 changed files with 118 additions and 102 deletions

View File

@@ -25,15 +25,15 @@ extern Tracing tracing;
bool trace_ParseTraceDepth(char const *arg);
template<typename T, typename M, typename N>
void trace_PrintBacktrace(std::vector<T> const &stack, M getName, N getLineNo) {
template<typename NodeT, typename NameFnT, typename LineNoFnT>
void trace_PrintBacktrace(std::vector<NodeT> const &stack, NameFnT getName, LineNoFnT getLineNo) {
size_t n = stack.size();
if (n == 0) {
return; // LCOV_EXCL_LINE
}
auto printLocation = [&](size_t i) {
T const &item = stack[n - i - 1];
NodeT const &item = stack[n - i - 1];
style_Reset(stderr);
if (!tracing.collapse) {
fputs(" ", stderr); // Just three spaces; the fourth will be printed next