cmdline: simpler unique_ptr construction 2.5
authorRobert Swiecki <robert@swiecki.net>
Fri, 16 Feb 2018 15:05:26 +0000 (16:05 +0100)
committerRobert Swiecki <robert@swiecki.net>
Fri, 16 Feb 2018 15:05:26 +0000 (16:05 +0100)
cmdline.cc

index 034fcbe..ba40095 100644 (file)
@@ -308,8 +308,7 @@ static std::string argByColon(const char* str, size_t pos) {
 }
 
 std::unique_ptr<nsjconf_t> parseArgs(int argc, char* argv[]) {
-       std::unique_ptr<nsjconf_t> nsjconf;
-       nsjconf.reset(new nsjconf_t);
+       std::unique_ptr<nsjconf_t> nsjconf(new nsjconf_t);
 
        nsjconf->use_execveat = false;
        nsjconf->exec_fd = -1;