浏览代码

cmState: Fix compilation on IBM XL compiler

Delay use of the PositionType constructor until after SnapshotDataType
is fully defined.
Brad King 10 年之前
父节点
当前提交
8f0a5d84e3
共有 2 个文件被更改,包括 8 次插入1 次删除
  1. 6 0
      Source/cmState.cxx
  2. 2 1
      Source/cmState.h

+ 6 - 0
Source/cmState.cxx

@@ -803,6 +803,12 @@ cmState::Snapshot cmState::Pop(cmState::Snapshot originSnapshot)
   return Snapshot(this, originSnapshot.Position->CallStackParent);
 }
 
+cmState::Snapshot::Snapshot(cmState* state)
+  : State(state)
+  , Position()
+{
+}
+
 cmState::Snapshot::Snapshot(cmState* state, PositionType position)
   : State(state),
   Position(position)

+ 2 - 1
Source/cmState.h

@@ -43,7 +43,8 @@ public:
 
   class Snapshot {
   public:
-    Snapshot(cmState* state = 0, PositionType position = PositionType());
+    Snapshot(cmState* state = 0);
+    Snapshot(cmState* state, PositionType position);
 
     void SetListFile(std::string const& listfile);