mirror of
https://github.com/NixOS/nix
synced 2025-06-27 21:01:16 +02:00
Eliminate more pass-by-value in variadic calls
This commit is contained in:
parent
603b2f583c
commit
092af3c826
2 changed files with 4 additions and 4 deletions
|
@ -97,14 +97,14 @@ public:
|
|||
unsigned int status = 1; // exit status
|
||||
|
||||
template<typename... Args>
|
||||
BaseError(unsigned int status, Args... args)
|
||||
BaseError(unsigned int status, const Args & ... args)
|
||||
: err(fmt(args...))
|
||||
, status(status)
|
||||
{
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
BaseError(Args... args)
|
||||
BaseError(const Args & ... args)
|
||||
: err(fmt(args...))
|
||||
{
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ public:
|
|||
int errNo;
|
||||
|
||||
template<typename... Args>
|
||||
SysError(Args... args)
|
||||
SysError(const Args & ... args)
|
||||
: Error(addErrno(fmt(args...)))
|
||||
{ }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue