From 070113cbb38abe2c4199d0091245d592bc7620e1 Mon Sep 17 00:00:00 2001 From: Mikhail Karasikov Date: Thu, 11 Mar 2021 02:00:59 +0100 Subject: [PATCH] cleanup in util::class_name --- include/sdsl/util.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/sdsl/util.hpp b/include/sdsl/util.hpp index 978922222..523276d03 100644 --- a/include/sdsl/util.hpp +++ b/include/sdsl/util.hpp @@ -208,7 +208,7 @@ template uint64_t hashvalue_of_classname(const T&) { std::hash str_hash; - return str_hash(sdsl::util::demangle2(typeid(T).name())); + return str_hash(demangle2(typeid(T).name())); } //! Transforms the demangled class name of an object to a hash value. @@ -219,12 +219,12 @@ std::string class_to_hash(const T& t) } template -std::string class_name(const T& t) +std::string class_name(const T&) { - std::string result = demangle2(typeid(t).name()); - size_t template_pos = result.find("<"); + std::string result = demangle2(typeid(T).name()); + std::string::size_type template_pos = result.find('<'); if (template_pos != std::string::npos) { - result = result.erase(template_pos); + result.erase(template_pos); } return result; }