Преглед на файлове

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 FilePath;
   long Line;
+  cmListFileContext(): Name(), FilePath(), Line(0) {}
 };
 
 std::ostream& operator<<(std::ostream&, cmListFileContext const&);