Use the length of the buffer instead of recomputing it again

Micro optimization: use the already known buffer length instead of
calling wcslen() to compute it again.
This commit is contained in:
Vadim Zeitlin 2023-03-27 16:25:01 +01:00
parent 7fba58c743
commit d8cf6d03dd

View file

@ -3645,7 +3645,7 @@ struct wxStringAsBufHelper<wchar_t>
{
wxScopedWCharBuffer wbuf(s.wc_str());
if ( len )
*len = wxWcslen(wbuf);
*len = wbuf.length();
return wbuf;
}
};