mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Remove "class " and "typename " from type_name
Co-authored-by: Nerixyz <nerixdev@outlook.de>
This commit is contained in:
parent
8d0d91f279
commit
ad4a0db6c3
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue