浏览代码

BUG: Make sure context info is always initialized

This adds a missing default constructor to cmListFileContext that makes
sure the line number is initialized to zero.  A zero line number will
indicate a generated context.
Brad King 17 年之前
父节点
当前提交
4db6658d8f
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Source/cmListFileCache.h

+ 1 - 0
Source/cmListFileCache.h

@@ -55,6 +55,7 @@ struct cmListFileContext
   std::string Name;
   std::string Name;
   std::string FilePath;
   std::string FilePath;
   long Line;
   long Line;
+  cmListFileContext(): Name(), FilePath(), Line(0) {}
 };
 };
 
 
 std::ostream& operator<<(std::ostream&, cmListFileContext const&);
 std::ostream& operator<<(std::ostream&, cmListFileContext const&);