forked from lix-project/lix
fmt(): Pass arguments by reference rather than by value
This commit is contained in:
parent
f4b9495854
commit
334b8f8af1
|
@ -158,7 +158,7 @@ extern Verbosity verbosity; /* suppress msgs > this */
|
||||||
#define vomit(args...) printMsg(lvlVomit, args)
|
#define vomit(args...) printMsg(lvlVomit, args)
|
||||||
|
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
inline void warn(const std::string & fs, Args... args)
|
inline void warn(const std::string & fs, const Args & ... args)
|
||||||
{
|
{
|
||||||
boost::format f(fs);
|
boost::format f(fs);
|
||||||
nop{boost::io::detail::feed(f, args)...};
|
nop{boost::io::detail::feed(f, args)...};
|
||||||
|
|
|
@ -67,7 +67,7 @@ inline std::string fmt(const FormatOrString & fs)
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
inline std::string fmt(const std::string & fs, Args... args)
|
inline std::string fmt(const std::string & fs, const Args & ... args)
|
||||||
{
|
{
|
||||||
boost::format f(fs);
|
boost::format f(fs);
|
||||||
f.exceptions(boost::io::all_error_bits ^ boost::io::too_many_args_bit);
|
f.exceptions(boost::io::all_error_bits ^ boost::io::too_many_args_bit);
|
||||||
|
|
Loading…
Reference in a new issue