Просмотр исходного кода

clang-tidy: fix `modernize-make-unique` lints

Ben Boeckel 2 лет назад
Родитель
Сommit
32c38a269a
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      Source/cmLocalVisualStudioGenerator.cxx

+ 3 - 1
Source/cmLocalVisualStudioGenerator.cxx

@@ -4,6 +4,8 @@
 
 #include <utility>
 
+#include <cm/memory>
+
 #include "windows.h"
 
 #include "cmCustomCommand.h"
@@ -105,7 +107,7 @@ cmLocalVisualStudioGenerator::MaybeCreateImplibDir(cmGeneratorTarget* target,
   // Add a pre-build event to create the directory.
   cmCustomCommandLines commands = cmMakeSingleCommandLine(
     { cmSystemTools::GetCMakeCommand(), "-E", "make_directory", impDir });
-  pcc.reset(new cmCustomCommand());
+  pcc = cm::make_unique<cmCustomCommand>();
   pcc->SetCommandLines(commands);
   pcc->SetStdPipesUTF8(true);
   pcc->SetEscapeOldStyle(false);