Explorar o código

cmListFileCache: Add explicit constructors

In order to construct with an initializer list in pure C++11, add
the explicit constructors.
Brad King %!s(int64=5) %!d(string=hai) anos
pai
achega
0e59b45dfc
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      Source/cmListFileCache.h

+ 8 - 0
Source/cmListFileCache.h

@@ -73,6 +73,14 @@ public:
   std::string FilePath;
   long Line = 0;
 
+  cmListFileContext() = default;
+  cmListFileContext(std::string name, std::string filePath, long line)
+    : Name(std::move(name))
+    , FilePath(std::move(filePath))
+    , Line(line)
+  {
+  }
+
   static cmListFileContext FromCommandContext(cmCommandContext const& lfcc,
                                               std::string const& fileName)
   {