few optimizations building string vector with arguments

- avoid unneeded copying (don't gather remaining string)
- don't build args byte by byte

Signed-off-by: Sergey G. Brester <serg.brester@sebres.de>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
This commit is contained in:
sebres
2023-03-22 14:50:45 +01:00
committed by Tino Reichardt
parent cc1192c7d9
commit 45c245645d
3 changed files with 51 additions and 24 deletions

View File

@@ -628,6 +628,7 @@ public:
UString &operator=(char c) { return (*this)=((wchar_t)(unsigned char)c); }
UString &operator=(const wchar_t *s);
UString &operator=(const UString &s);
void AddFrom(const wchar_t *s, unsigned len); // no check
void SetFrom(const wchar_t *s, unsigned len); // no check
void SetFromBstr(LPCOLESTR s);
UString &operator=(const char *s);