diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2011-11-19 10:02:20 -0500 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2011-11-19 10:02:20 -0500 |
| commit | e97fb23218734d1fbda87eedd7659235777a69ae (patch) | |
| tree | 35a06df3177927ab4656d0e72f342ed1012a0c1f /indra/llcommon/llsd.h | |
| parent | b49c934bd913c0973630abf32ea566eefa1aa973 (diff) | |
Make LLSD diagnostic methods conditional on LLSD_DEBUG_INFO.
This establishes that there are no viewer-side unit tests relying on these
methods. The point is to try to clean up the LLSD public API. In the same
vein, remove from LLSD public API a diagnostic method which is nothing more
than an implementation detail for the corresponding LLSD::Impl method. The
same effect can be achieved by making LLSD::Impl a friend of LLSD, moving the
method with the messy signature (classic-C arrays!) into LLSD::Impl itself.
Diffstat (limited to 'indra/llcommon/llsd.h')
| -rw-r--r-- | indra/llcommon/llsd.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h index 80c3e9e7b5..3519b134c2 100644 --- a/indra/llcommon/llsd.h +++ b/indra/llcommon/llsd.h @@ -387,13 +387,20 @@ public: class Impl; private: Impl* impl; + friend class LLSD::Impl; //@} /** @name Unit Testing Interface */ //@{ public: +#ifdef LLSD_DEBUG_INFO + /// @warn THESE COUNTS WILL NOT BE ACCURATE IN A MULTI-THREADED + /// ENVIRONMENT. + /// + /// These counts track LLSD::Impl (hidden) objects. static U32 allocationCount(); ///< how many Impls have been made static U32 outstandingCount(); ///< how many Impls are still alive +#endif //@} private: @@ -407,12 +414,17 @@ private: //@} public: +#ifdef LLSD_DEBUG_INFO void dumpStats() const; // Output information on object and usage - void calcStats(S32 type_counts[], S32 share_counts[]) const; // Calculate the number of LLSD objects used by this value +#endif static std::string typeString(Type type); // Return human-readable type as a string #ifdef LLSD_DEBUG_INFO + /// @warn THESE COUNTS WILL NOT BE ACCURATE IN A MULTI-THREADED + /// ENVIRONMENT. + /// + /// These counts track LLSD (public) objects. static S32 sLLSDAllocationCount; // Number of LLSD objects ever created static S32 sLLSDNetObjects; // Number of LLSD objects that exist #endif |
