Minor fixes.
This commit is contained in:
parent
01971c9f0d
commit
829e724a2c
9 changed files with 127 additions and 97 deletions
|
|
@ -266,7 +266,7 @@ public:
|
|||
template <typename ...Args> String &assignf (const char *fmt, Args ...args) {
|
||||
const size_t size = snprintf (nullptr, 0, fmt, args...);
|
||||
|
||||
Array <char, ReservePolicy::PlusOne> buffer (size + 1);
|
||||
SmallArray <char> buffer (size + 1);
|
||||
snprintf (buffer.data (), size + 1, fmt, cr::forward <Args> (args)...);
|
||||
|
||||
return assign (buffer.data ());
|
||||
|
|
@ -278,7 +278,7 @@ public:
|
|||
}
|
||||
const size_t size = snprintf (nullptr, 0, fmt, args...) + length ();
|
||||
|
||||
Array <char, ReservePolicy::PlusOne> buffer (size + 1);
|
||||
SmallArray <char> buffer (size + 1);
|
||||
snprintf (buffer.data (), size + 1, fmt, cr::forward <Args> (args)...);
|
||||
|
||||
return append (buffer.data ());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue