Make wxTemp[F]File classes non default ctor explicit
There should really be no reason to ever implicitly convert a string to a file.
This commit is contained in:
@@ -118,7 +118,7 @@ public:
|
|||||||
// default
|
// default
|
||||||
wxTempFFile() { }
|
wxTempFFile() { }
|
||||||
// associates the temp file with the file to be replaced and opens it
|
// associates the temp file with the file to be replaced and opens it
|
||||||
wxTempFFile(const wxString& strName);
|
explicit wxTempFFile(const wxString& strName);
|
||||||
|
|
||||||
// open the temp file (strName is the name of file to be replaced)
|
// open the temp file (strName is the name of file to be replaced)
|
||||||
bool Open(const wxString& strName);
|
bool Open(const wxString& strName);
|
||||||
|
@@ -147,7 +147,7 @@ public:
|
|||||||
// default
|
// default
|
||||||
wxTempFile() { }
|
wxTempFile() { }
|
||||||
// associates the temp file with the file to be replaced and opens it
|
// associates the temp file with the file to be replaced and opens it
|
||||||
wxTempFile(const wxString& strName);
|
explicit wxTempFile(const wxString& strName);
|
||||||
|
|
||||||
// open the temp file (strName is the name of file to be replaced)
|
// open the temp file (strName is the name of file to be replaced)
|
||||||
bool Open(const wxString& strName);
|
bool Open(const wxString& strName);
|
||||||
|
@@ -54,7 +54,7 @@ public:
|
|||||||
@warning
|
@warning
|
||||||
You should use IsOpened() to verify that the constructor succeeded.
|
You should use IsOpened() to verify that the constructor succeeded.
|
||||||
*/
|
*/
|
||||||
wxTempFFile(const wxString& strName);
|
explicit wxTempFFile(const wxString& strName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor calls Discard() if temporary file is still open.
|
Destructor calls Discard() if temporary file is still open.
|
||||||
|
@@ -52,7 +52,7 @@ public:
|
|||||||
@warning
|
@warning
|
||||||
You should use IsOpened() to verify that the constructor succeeded.
|
You should use IsOpened() to verify that the constructor succeeded.
|
||||||
*/
|
*/
|
||||||
wxTempFile(const wxString& strName);
|
explicit wxTempFile(const wxString& strName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor calls Discard() if temporary file is still open.
|
Destructor calls Discard() if temporary file is still open.
|
||||||
|
Reference in New Issue
Block a user