mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Fixup coverage of type_name.hpp to 100%
Reassign the demangled name to avoid the (always untaken) branch and reduce code duplication
This commit is contained in:
parent
1a81536f3c
commit
f19caf428c
1 changed files with 2 additions and 3 deletions
|
|
@ -47,8 +47,7 @@ namespace mock { namespace detail {
|
|||
};
|
||||
std::unique_ptr<const char, Deleter> demangled(abi::__cxa_demangle(name, 0, 0, &status));
|
||||
if(!status && demangled)
|
||||
serialize(s, demangled.get());
|
||||
else
|
||||
name = demangled.get();
|
||||
#endif
|
||||
serialize(s, name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue