Fixed condition not to be always false.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@24262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -94,7 +94,7 @@ wxMetafile::wxMetafile(const wxString& file)
|
||||
|
||||
M_METAFILEDATA->m_windowsMappingMode = wxMM_ANISOTROPIC;
|
||||
M_METAFILEDATA->m_metafile = 0;
|
||||
if (!file.IsNull() && (file.Cmp(wxT("")) == 0))
|
||||
if (!file.empty())
|
||||
M_METAFILEDATA->m_metafile = (WXHANDLE) GetMetaFile(file);
|
||||
}
|
||||
|
||||
@@ -377,12 +377,12 @@ bool wxMakeMetafilePlaceable(const wxString& filename, int x1, int y1, int x2, i
|
||||
p < (WORD *)&pMFHead ->checksum; ++p)
|
||||
pMFHead ->checksum ^= *p;
|
||||
|
||||
FILE *fd = wxFopen(filename.fn_str(), "rb");
|
||||
FILE *fd = wxFopen(filename.fn_str(), wxT("rb"));
|
||||
if (!fd) return FALSE;
|
||||
|
||||
wxChar tempFileBuf[256];
|
||||
wxGetTempFileName(wxT("mf"), tempFileBuf);
|
||||
FILE *fHandle = wxFopen(wxConvFile.cWX2MB(tempFileBuf), "wb");
|
||||
FILE *fHandle = wxFopen(wxFNCONV(tempFileBuf), wxT("wb"));
|
||||
if (!fHandle)
|
||||
return FALSE;
|
||||
fwrite((void *)&header, sizeof(unsigned char), sizeof(mfPLACEABLEHEADER), fHandle);
|
||||
|
Reference in New Issue
Block a user