mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 16:23:02 +00:00
Logger::cout: Use fmt()
This ensures that in cout(s), 's' does not get interpreted as a format string.
This commit is contained in:
parent
989b823ac5
commit
09f5975c6a
@ -102,11 +102,9 @@ public:
|
|||||||
virtual void writeToStdout(std::string_view s);
|
virtual void writeToStdout(std::string_view s);
|
||||||
|
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
inline void cout(const std::string & fs, const Args & ... args)
|
inline void cout(const Args & ... args)
|
||||||
{
|
{
|
||||||
boost::format f(fs);
|
writeToStdout(fmt(args...));
|
||||||
formatHelper(f, args...);
|
|
||||||
writeToStdout(f.str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::optional<char> ask(std::string_view s)
|
virtual std::optional<char> ask(std::string_view s)
|
||||||
|
Loading…
Reference in New Issue
Block a user