mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
fix new clang warning and add helper function
This commit is contained in:
parent
83a48af36a
commit
27baa178d2
@ -23,6 +23,10 @@ namespace ngcore
|
||||
|
||||
NGCORE_API std::string Demangle(const char* typeinfo);
|
||||
|
||||
template<typename T>
|
||||
NGCORE_API std::string GetName(const T& obj)
|
||||
{ return Demangle(typeid(obj).name()); }
|
||||
|
||||
#if defined(__GNUC__)
|
||||
inline bool likely (bool x) { return bool(__builtin_expect(long(x), 1L)); }
|
||||
inline bool unlikely (bool x) { return bool(__builtin_expect(long(x), 0L)); }
|
||||
|
@ -519,7 +519,8 @@ namespace netgen
|
||||
stringstream str;
|
||||
occgeometry->GetTopologyTree (str);
|
||||
|
||||
char* cstr = (char*)str.str().c_str();
|
||||
auto txt = str.str();
|
||||
char* cstr = (char*) txt.c_str();
|
||||
|
||||
(*testout) << cstr << endl;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user