From ad4a0db6c3198c91d85032280c1282c75293f561 Mon Sep 17 00:00:00 2001 From: Mm2PL Date: Tue, 1 Oct 2024 13:39:22 +0200 Subject: [PATCH] Remove "class " and "typename " from type_name Co-authored-by: Nerixyz --- src/util/TypeName.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/util/TypeName.hpp b/src/util/TypeName.hpp index 3e5c674e8..1f6066381 100644 --- a/src/util/TypeName.hpp +++ b/src/util/TypeName.hpp @@ -28,6 +28,15 @@ constexpr auto type_name() name.remove_prefix(prefix.size()); name.remove_suffix(suffix.size()); + if (name.starts_with("class ")) + { + name.remove_prefix(6); + } + if (name.starts_with("struct ")) + { + name.remove_prefix(7); + } + return name; }