--- libgig/trunk/src/Serialization.cpp 2017/05/10 21:17:10 3169 +++ libgig/trunk/src/Serialization.cpp 2017/05/10 23:07:28 3173 @@ -27,6 +27,7 @@ #include #include // for memcpy() #include // for atof() +#include #include "helper.h" @@ -127,15 +128,22 @@ } String DataType::asLongDescr() const { - //TODO: Demangling of C++ raw type names String s = m_baseTypeName; if (!m_customTypeName.empty()) - s += " " + m_customTypeName; + s += " " + customTypeName(true); if (isPointer()) s += " pointer"; return s; } + String DataType::customTypeName(bool demangle) const { + if (!demangle) return m_customTypeName; + int status; + const char* result = + abi::__cxa_demangle(m_customTypeName.c_str(), 0, 0, &status); + return (status == 0) ? result : m_customTypeName; + } + // *************** Member *************** // *