diff --git a/src/include/recset.cpp b/src/include/recset.cpp index 5566ec5c2..16d30155e 100755 --- a/src/include/recset.cpp +++ b/src/include/recset.cpp @@ -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); } diff --git a/src/include/recset.h b/src/include/recset.h index 0cd475ccf..f9cf5819d 100755 --- a/src/include/recset.h +++ b/src/include/recset.h @@ -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);