From 30d6c59b297f98ebda1d6c14e56f289bd3b02799 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 2 Jan 2011 22:04:48 +0000 Subject: [PATCH] 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 --- src/common/filefn.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 4dd3e7a..f887f46 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -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 -- 2.7.4