Patch level : 10.0
Files correlati : Ricompilazione Demo : [ ] Commento : Aggiunto metodo empty alle cache git-svn-id: svn://10.65.10.50/trunk@18566 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
972191e949
commit
ad21e8e32f
@ -433,14 +433,11 @@ TObject* TCache::objptr(size_t s)
|
|||||||
|
|
||||||
void TCache::destroy()
|
void TCache::destroy()
|
||||||
{
|
{
|
||||||
for (int i = _data.last(); i >= 0; i--)
|
FOR_EACH_ARRAY_ITEM_BACK(_data, i, o)
|
||||||
{
|
{
|
||||||
THash_object* ho = (THash_object*)_data.objptr(i);
|
THash_object* ho = (THash_object*)o;
|
||||||
if (ho != NULL)
|
discarding(ho);
|
||||||
{
|
_data.destroy(i);
|
||||||
discarding(ho);
|
|
||||||
_data.destroy(i);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
TObject* objptr(const TString& key);
|
TObject* objptr(const TString& key);
|
||||||
TObject* objptr(size_t nkey);
|
TObject* objptr(size_t nkey);
|
||||||
|
bool empty() const { return _data.empty(); }
|
||||||
void destroy(); // Not very useful, but who knows?
|
void destroy(); // Not very useful, but who knows?
|
||||||
TCache(size_t size = 0); // 883 assigned by default
|
TCache(size_t size = 0); // 883 assigned by default
|
||||||
virtual ~TCache();
|
virtual ~TCache();
|
||||||
|
@ -125,13 +125,14 @@ bool yesnofatal_box(
|
|||||||
buildmsg();
|
buildmsg();
|
||||||
|
|
||||||
#ifdef DBG
|
#ifdef DBG
|
||||||
char s[256]; sprintf(s, "%s\nContinuare ugualmente?", msg);
|
char user[32]; xvt_sys_get_user_name(user, 32);
|
||||||
const bool ret = yesno_box("%s", s);
|
char s[256]; sprintf(s, "Ma lo sai %s cos'e' successo?\n%s\nVuoi perseverare?", user, msg);
|
||||||
|
const bool ret = yesno_box(s);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
#endif
|
#endif
|
||||||
fatal_box(msg);
|
fatal_box(msg);
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @doc EXTERNAL
|
// @doc EXTERNAL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user