This changes a couple of spots to use std::make_unique rather than
'new'. This is a bit more idiomatic. I've only touched code
involving ui_file here, there are plenty more changes like this that
could be made, but I considered those unrelated to this series.
Approved-By: Andrew Burgess <aburgess@redhat.com>
return;
}
- stdio_file_up log (new no_terminal_escape_file ());
+ stdio_file_up log = std::make_unique<no_terminal_escape_file> ();
if (!log->open (logging_filename.c_str (), logging_overwrite ? "w" : "a"))
perror_with_name (_("set logging"));
if (!serial_logfile.empty ())
{
- stdio_file_up file (new stdio_file ());
+ stdio_file_up file = std::make_unique<stdio_file> ();
if (!file->open (serial_logfile.c_str (), "w"))
perror_with_name (serial_logfile.c_str ());