diff options
Diffstat (limited to 'src/Utils.h')
-rw-r--r-- | src/Utils.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Utils.h b/src/Utils.h index 0e27d7e..c2fa1fc 100644 --- a/src/Utils.h +++ b/src/Utils.h @@ -117,6 +117,13 @@ namespace SaneAudioRenderer #endif
}
+ template <class T>
+ inline const char* ClassName(T* p)
+ {
+ const char* str = strrchr(typeid(*p).name(), ':');
+ return str ? str + 1 : "";
+ }
+
template <typename>
class WinapiFunc;
template <typename ReturnType, typename...Args>
|