Patch level : 12.0 no-patch

Files correlati     :
Commento            :

Inserite SAFE_DELETE
This commit is contained in:
Alessandro Bonazzi 2020-07-26 09:54:00 +02:00
parent 996373a99b
commit 683725fd11
2 changed files with 6 additions and 9 deletions

View File

@ -870,12 +870,12 @@ bool list_custom_files(const char* ext, const char* classe, TString_array& files
return !files.empty();
}
bool select_custom_file(TFilename& path, const char* ext, const char* classe)
bool select_custom_file(TFilename& path, const char* ext, const char* library)
{
TArray_sheet sheet(-1, -1, 78, 20, TR("Selezione"), HR("Nome@16|Classe@8|Descrizione@50|Custom"));
TString_array& files = sheet.rows_array();
TFilename first = path.name(); first.ext(""); // Riga su cui posizionarsi
bool ok = list_custom_files(ext, classe, files);
bool ok = list_custom_files(ext, library, files);
if (ok)
{
@ -1633,11 +1633,8 @@ void TISAM_recordset::reset()
void TISAM_recordset::requery()
{
if (_cursor != NULL)
{
SAFE_DELETE(_cursor);
SAFE_DELETE(_relation);
}
SAFE_DELETE(_cursor);
SAFE_DELETE(_relation);
}
void TISAM_recordset::set(const char* use)
@ -1685,7 +1682,7 @@ TString& TISAM_recordset::add_between_filter(const TString& field, const TString
}
TISAM_recordset::TISAM_recordset(const char* use)
: _relation(NULL), _cursor(NULL)
: _relation(nullptr), _cursor(nullptr)
{
set(use);
}

View File

@ -183,7 +183,7 @@ public:
///////////////////////////////////////////////////////////
bool list_custom_files(const char* ext, const char* library, TString_array& files);
bool select_custom_file(TFilename& path, const char* ext, const char* library = NULL);
bool select_custom_file(TFilename& path, const char* ext, const char* classe = NULL);
const TString& logic2table(int logic_num);
int table2logic(const TString& name);
TRecordset* create_recordset(const TString& sql);