Make wxStringOutputStream ctor explicit
Avoid accidentally creating wxStringOutputStream from a wxString pointer, this seems unlikely, but why take the risk of it happening at all.
This commit is contained in:
@@ -62,8 +62,8 @@ public:
|
|||||||
//
|
//
|
||||||
// Note that the conversion object should have the life time greater than
|
// Note that the conversion object should have the life time greater than
|
||||||
// this stream.
|
// this stream.
|
||||||
wxStringOutputStream(wxString *pString = NULL,
|
explicit wxStringOutputStream(wxString *pString = NULL,
|
||||||
wxMBConv& conv = wxConvUTF8);
|
wxMBConv& conv = wxConvUTF8);
|
||||||
|
|
||||||
// get the string containing current output
|
// get the string containing current output
|
||||||
const wxString& GetString() const { return *m_str; }
|
const wxString& GetString() const { return *m_str; }
|
||||||
|
@@ -62,7 +62,7 @@ public:
|
|||||||
with default value of this argument the data written to the stream must
|
with default value of this argument the data written to the stream must
|
||||||
be valid UTF-8, pass @c wxConvISO8859_1 to deal with arbitrary 8 bit data.
|
be valid UTF-8, pass @c wxConvISO8859_1 to deal with arbitrary 8 bit data.
|
||||||
*/
|
*/
|
||||||
wxStringOutputStream(wxString* pString = 0, wxMBConv& conv = wxConvUTF8);
|
explicit wxStringOutputStream(wxString* pString = NULL, wxMBConv& conv = wxConvUTF8);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the string containing all the data written to the stream so far.
|
Returns the string containing all the data written to the stream so far.
|
||||||
|
Reference in New Issue
Block a user