From e52dc8db11310cf018afa6a6991bb01971d7c9fe Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Mon, 20 Nov 2017 00:04:57 +0100 Subject: [PATCH] Introspection: start solution id at index 1 ... allowing 0 to have special meaning "invalid" --- core/src/introspection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/introspection.cpp b/core/src/introspection.cpp index 6669f68c..d1da1df4 100644 --- a/core/src/introspection.cpp +++ b/core/src/introspection.cpp @@ -146,7 +146,7 @@ uint32_t Introspection::stageId(const Stage* const s) const uint32_t Introspection::solutionId(const SolutionBase& s) { - auto result = impl->id_solution_bimap_.left.insert(std::make_pair(impl->id_solution_bimap_.size(), &s)); + auto result = impl->id_solution_bimap_.left.insert(std::make_pair(1 + impl->id_solution_bimap_.size(), &s)); return result.first->first; }