mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 14:10:30 +03:00
Stop using va_argsave now that va_start works correctly without it
This commit is contained in:
parent
271f44e5da
commit
1d2a706f4a
2 changed files with 2 additions and 8 deletions
|
@ -313,10 +313,7 @@ class OutBuffer
|
|||
void printf(string format, ...) @trusted
|
||||
{
|
||||
va_list ap;
|
||||
static if (is(typeof(__va_argsave)))
|
||||
va_start(ap, __va_argsave);
|
||||
else
|
||||
va_start(ap, format);
|
||||
va_start(ap, format);
|
||||
vprintf(format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
|
|
@ -1206,10 +1206,7 @@ class Stream : InputStream, OutputStream {
|
|||
// returns number of bytes written
|
||||
size_t printf(const(char)[] format, ...) {
|
||||
va_list ap;
|
||||
static if (is(typeof(__va_argsave)))
|
||||
va_start(ap, __va_argsave);
|
||||
else
|
||||
va_start(ap, format);
|
||||
va_start(ap, format);
|
||||
auto result = vprintf(format, ap);
|
||||
va_end(ap);
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue