FunctionTracer: use __PRETTY_FUNCTION__

Change-Id: I49d53f4bb7b65d32c9e1e22be89add6199ccad24
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10038
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: Niels Sascha Reedijk <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
PulkoMandy
2025-12-01 09:48:36 +00:00
committed by Adrien Destugues
parent 7ad0bd3735
commit b1ff3e6c46
4 changed files with 5 additions and 10 deletions
+2 -4
View File
@@ -13,15 +13,13 @@ namespace BPrivate {
class FunctionTracer {
public:
FunctionTracer(const char* className, const char* functionName,
int32& depth)
: fFunctionName(),
FunctionTracer(const char* functionName, int32& depth)
: fFunctionName(functionName),
fPrepend(),
fFunctionDepth(depth)
{
fFunctionDepth++;
fPrepend.Append(' ', fFunctionDepth * 2);
fFunctionName << className << "::" << functionName << "()";
printf("%s%s {\n", fPrepend.String(), fFunctionName.String());
}