Take wxFormatString in wxString::Format() and sprintf() too
The argument of these functions will have to be converted to wxFormatString anyhow in Printf(), so take it directly, as this at least means that only a single conversion will be done, when Format() is called, instead of converting whatever is passed to it to wxString before converting this wxString to wxFormatString.
This commit is contained in:
parent
e21b77cb14
commit
c453167c71
1 changed files with 2 additions and 2 deletions
|
|
@ -2212,7 +2212,7 @@ public:
|
|||
|
||||
// returns the string containing the result of Printf() to it
|
||||
template <typename... Targs>
|
||||
static wxString Format(const wxString& format, Targs... args)
|
||||
static wxString Format(const wxFormatString& format, Targs... args)
|
||||
{
|
||||
wxString s;
|
||||
s.Printf(format, args...);
|
||||
|
|
@ -2241,7 +2241,7 @@ public:
|
|||
|
||||
// use Printf()
|
||||
template <typename... Targs>
|
||||
int sprintf(const wxString& format, Targs... args)
|
||||
int sprintf(const wxFormatString& format, Targs... args)
|
||||
{
|
||||
return Printf(format, args...);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue