1
0
mirror of synced 2025-01-19 01:24:15 +01:00

patterns: Display actual type name of types declared with using

This commit is contained in:
WerWolv 2022-03-03 13:33:45 +01:00
parent 949a26ca0e
commit 559b86efe1
2 changed files with 2 additions and 2 deletions

View File

@ -256,7 +256,7 @@ namespace hex::pl {
ImGui::TableNextColumn();
ImGui::TextFormatted("0x{0:04X}", this->getSize());
ImGui::TableNextColumn();
ImGui::TextFormattedColored(ImColor(0xFF9BC64D), "{}", this->getFormattedName());
ImGui::TextFormattedColored(ImColor(0xFF9BC64D), "{}", this->getTypeName().empty() ? this->getFormattedName() : this->getTypeName());
ImGui::TableNextColumn();
ImGui::TextFormatted("{}", formatDisplayValue(value, std::move(literal)));
}

View File

@ -61,7 +61,7 @@ namespace hex::pl {
}
[[nodiscard]] std::string getFormattedName() const override {
std::string result = this->m_pointedAt->getFormattedName() + "* : ";
std::string result = this->getTypeName().empty() ? this->getFormattedName() : this->getTypeName() + "* : ";
switch (this->getSize()) {
case 1:
result += "u8";