From 60b832918fd790df5d7db09db3929ec646b00a17 Mon Sep 17 00:00:00 2001 From: Philipp Grulich Date: Sun, 24 Mar 2024 21:29:53 +0100 Subject: [PATCH] first commit --- nautilus-api/include/Interface/DataTypes/Val.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nautilus-api/include/Interface/DataTypes/Val.hpp b/nautilus-api/include/Interface/DataTypes/Val.hpp index 0c804f45..cfbeeb8c 100644 --- a/nautilus-api/include/Interface/DataTypes/Val.hpp +++ b/nautilus-api/include/Interface/DataTypes/Val.hpp @@ -136,7 +136,11 @@ namespace nautilus { #ifdef USE_SOURCE_LOCATION_TRACKING - + inline val() : state(tracing::traceConstant(0)) { + if (tracing::inTracer()) { + tracing::getVarRefMap()[state]++; + } + }; inline val(ValueType value, const std::source_location loc = std::source_location::current()) : value(value), loc(loc), state(tracing::traceConstant(value)) {