return fn;
}
-void wxGenericFileCtrl::DoGetFilenames( wxArrayString& filenames, const bool fullPath ) const
+// helper used in DoGetFilenames() and needed because Borland can't compile
+// operator?: inline
+static inline wxString GetFileNameOrPath(const wxFileName& fn, bool fullPath)
+{
+ return fullPath ? fn.GetFullPath() : fn.GetFullName();
+}
+
+void
+wxGenericFileCtrl::DoGetFilenames(wxArrayString& filenames, bool fullPath) const
{
filenames.clear();
if ( fn.IsRelative() )
fn.MakeAbsolute(dir);
- filenames.push_back(fullPath ? fn.GetFullPath() : fn.GetFullName());
+ filenames.push_back(GetFileNameOrPath(fn, fullPath));
return;
}
m_list->GetItem(item);
const wxFileName fn(dir, item.m_text);
- filenames.push_back(fullPath ? fn.GetFullPath() : fn.GetFullName());
+ filenames.push_back(GetFileNameOrPath(fn, fullPath));
}
}