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()
|
||||
{
|
||||
for (int i = _data.last(); i >= 0; i--)
|
||||
FOR_EACH_ARRAY_ITEM_BACK(_data, i, o)
|
||||
{
|
||||
THash_object* ho = (THash_object*)_data.objptr(i);
|
||||
if (ho != NULL)
|
||||
{
|
||||
discarding(ho);
|
||||
_data.destroy(i);
|
||||
}
|
||||
THash_object* ho = (THash_object*)o;
|
||||
discarding(ho);
|
||||
_data.destroy(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ protected:
|
||||
public:
|
||||
TObject* objptr(const TString& key);
|
||||
TObject* objptr(size_t nkey);
|
||||
|
||||
bool empty() const { return _data.empty(); }
|
||||
void destroy(); // Not very useful, but who knows?
|
||||
TCache(size_t size = 0); // 883 assigned by default
|
||||
virtual ~TCache();
|
||||
|
@ -125,13 +125,14 @@ bool yesnofatal_box(
|
||||
buildmsg();
|
||||
|
||||
#ifdef DBG
|
||||
char s[256]; sprintf(s, "%s\nContinuare ugualmente?", msg);
|
||||
const bool ret = yesno_box("%s", s);
|
||||
char user[32]; xvt_sys_get_user_name(user, 32);
|
||||
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)
|
||||
#endif
|
||||
fatal_box(msg);
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// @doc EXTERNAL
|
||||
|
Loading…
x
Reference in New Issue
Block a user