Simplify wxFileNameFromPath() implementation to avoid redundancy.

No real changes, just use wxFileName::GetFullName() in wxFileNameFromPath()
instead of reimplementing it there.

Closes #12818.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2011-01-02 22:04:48 +00:00
parent 13705b8ccf
commit 30d6c59b29

View File

@ -735,16 +735,7 @@ wxChar *wxFileNameFromPath (wxChar *path)
wxString wxFileNameFromPath (const wxString& path)
{
wxString name, ext;
wxFileName::SplitPath(path, NULL, &name, &ext);
wxString fullname = name;
if ( !ext.empty() )
{
fullname << wxFILE_SEP_EXT << ext;
}
return fullname;
return wxFileName(path).GetFullName();
}
// Return just the directory, or NULL if no directory