From 7851c698bd9057cb51eea31e4208cb2c0ba3964b Mon Sep 17 00:00:00 2001 From: chatty Date: Thu, 5 May 1994 08:48:40 +0000 Subject: Renamed members of enum check_type --- utils/SmartPointer.cc | 16 ++++++++-------- utils/SmartPointer.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'utils') diff --git a/utils/SmartPointer.cc b/utils/SmartPointer.cc index a0ddc04..9775b49 100644 --- a/utils/SmartPointer.cc +++ b/utils/SmartPointer.cc @@ -18,7 +18,7 @@ #include "SmartPointer.h" -CcuSmartData::check_type CcuSmartData::check = Warn; +CcuSmartData::check_type CcuSmartData::check = doWarn; int CcuSmartData::NextCreatedIsDynamic = 0; /*?class CcuSmartData @@ -82,13 +82,13 @@ when their reference count reaches zero. CcuSmartData :: ~CcuSmartData () { if (State > 1) { - if (check >= OnlyDynamic) { + if (check >= doOnlyDynamic) { if (IsDynamic ()) fprintf (stderr, "*** ~CcuSmartData (0x%x) : ref count of dynamic object is %d !\n", this, int (State/2)); - else if (check >= Warn) + else if (check >= doWarn) fprintf (stderr, "*** ~CcuSmartData (0x%x) : ref count of global or automatic object is %d !\n", this, int (State/2)); } - if (check == Abort) { + if (check == doAbort) { fprintf (stderr, "*** aborting\n"); abort (); } @@ -124,11 +124,11 @@ Such errors can happen in two situations:\\ destroyed upon exit of its enclosing block.\\ \vspace{0.5ex} When an error occurs, the value of \var{chk} defines what happens, as follows:\\ - \hspace*{0.5cm}$\bullet$ if \var{t} is \var{Warn}, a message is issued on \var{stderr} and processing continues;\\ - \hspace*{0.5cm}$\bullet$ if \var{t} is \var{Abort}, a message is issued and and \fun{abort} is called, forcing a core dump;\\ + \hspace*{0.5cm}$\bullet$ if \var{t} is \var{doWarn}, a message is issued on \var{stderr} and processing continues;\\ + \hspace*{0.5cm}$\bullet$ if \var{t} is \var{doAbort}, a message is issued and and \fun{abort} is called, forcing a core dump;\\ but not for dynamically allocated objects.\\ - \hspace*{0.5cm}$\bullet$ if \var{t} is \var{OnlyDynamic}, checking is disabled for global and automatic objects, - \hspace*{0.5cm}$\bullet$ if \var{t} is \var{NoCheck}, checking is disabled.\\ + \hspace*{0.5cm}$\bullet$ if \var{t} is \var{doOnlyDynamic}, checking is disabled for global and automatic objects, + \hspace*{0.5cm}$\bullet$ if \var{t} is \var{doNoCheck}, checking is disabled.\\ \fun{SetCheck} returns the previous value of the checking status. The initial value is 0 (warning message). ?*/ diff --git a/utils/SmartPointer.h b/utils/SmartPointer.h index 62ff095..2131c71 100644 --- a/utils/SmartPointer.h +++ b/utils/SmartPointer.h @@ -20,7 +20,7 @@ class CcuSmartData { public: - enum check_type { NoCheck, OnlyDynamic, Warn, Abort }; + enum check_type { doNoCheck, doOnlyDynamic, doWarn, doAbort }; private: static check_type check; -- cgit v1.1