optimize wxFormatStringArgumentFinder<T> for strings and make it work correctly for wxCharBuffer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
ecdc118383
commit
5431a79f1e
@ -227,10 +227,21 @@ struct wxFormatStringArgumentFinder<const wxFormatString&>
|
||||
|
||||
template<>
|
||||
struct wxFormatStringArgumentFinder<wxFormatString>
|
||||
{
|
||||
static wxFormatStringArgument find(const wxFormatString& arg)
|
||||
{ return wxFormatStringArgument(&arg); }
|
||||
};
|
||||
: public wxFormatStringArgumentFinder<const wxFormatString&> {};
|
||||
|
||||
// avoid passing big objects by value to wxFormatStringArgumentFinder::find()
|
||||
// (and especially wx[W]CharBuffer with its auto_ptr<> style semantics!):
|
||||
template<>
|
||||
struct wxFormatStringArgumentFinder<wxString>
|
||||
: public wxFormatStringArgumentFinder<const wxString&> {};
|
||||
|
||||
template<>
|
||||
struct wxFormatStringArgumentFinder<wxCharBuffer>
|
||||
: public wxFormatStringArgumentFinder<const wxCharBuffer&> {};
|
||||
|
||||
template<>
|
||||
struct wxFormatStringArgumentFinder<wxWCharBuffer>
|
||||
: public wxFormatStringArgumentFinder<const wxWCharBuffer&> {};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user