Check for self-assignment in wxFileName::operator=().

This is a backport of r56794 from trunk but adds the check for self-assignment
to the Assign() implementation which is in a .cpp file and so is compiled into
the library and not operator=() itself which is inlined to avoid any problems
with mixing different version of this inline function when updating to next
2.8 version without recompiling.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@61943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-09-16 11:37:46 +00:00
parent ce2a0101bf
commit 122fc27e3e

View File

@@ -305,6 +305,9 @@ static bool IsUNCPath(const wxString& path, wxPathFormat format)
void wxFileName::Assign( const wxFileName &filepath )
{
if ( &filepath == this )
return;
m_volume = filepath.GetVolume();
m_dirs = filepath.GetDirs();
m_name = filepath.GetName();