Logging: Log all called service functions (under trace). Compile out all trace logs under release for performance.

This commit is contained in:
archshift 2015-01-10 13:07:50 -08:00
parent 083072de56
commit 228843c43e
12 changed files with 30 additions and 57 deletions

View file

@ -369,14 +369,14 @@ private:
StorageType storage;
ResultCode result_code;
#if _DEBUG
#ifdef _DEBUG
// The purpose of this pointer is to aid inspecting the type with a debugger, eliminating the
// need to cast `storage` to a pointer or pay attention to `result_code`.
const T* debug_ptr;
#endif
void UpdateDebugPtr() {
#if _DEBUG
#ifdef _DEBUG
debug_ptr = empty() ? nullptr : static_cast<const T*>(static_cast<const void*>(&storage));
#endif
}