diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-30 22:18:33 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-06-02 23:14:33 (GMT) |
commit | da28f11523644cdc2138a0cde2c4c015948ff46c (patch) | |
tree | 8448e145a4236a96bb8685fc4ac4711e82aae6ec /Source/cmState.cxx | |
parent | d3bb5da9294ddbfcc5fddf7ba3dafd2c3e0b32b2 (diff) | |
download | CMake-da28f11523644cdc2138a0cde2c4c015948ff46c.zip CMake-da28f11523644cdc2138a0cde2c4c015948ff46c.tar.gz CMake-da28f11523644cdc2138a0cde2c4c015948ff46c.tar.bz2 |
cmState: Add CreateBaseSnapshot method.
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r-- | Source/cmState.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 58885d3..eade817 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -659,12 +659,22 @@ void cmState::Snapshot::ComputeRelativePathTopBinary() } } +cmState::Snapshot cmState::CreateBaseSnapshot() +{ + PositionType pos = 0; + this->ParentPositions.push_back(pos); + this->Locations.resize(1); + this->OutputLocations.resize(1); + this->CurrentSourceDirectoryComponents.resize(1); + this->CurrentBinaryDirectoryComponents.resize(1); + this->RelativePathTopSource.resize(1); + this->RelativePathTopBinary.resize(1); + return cmState::Snapshot(this, pos); +} + cmState::Snapshot cmState::CreateSnapshot(Snapshot originSnapshot) { - if (!originSnapshot.IsValid()) - { - originSnapshot.State = this; - } + assert(originSnapshot.IsValid()); PositionType pos = this->ParentPositions.size(); this->ParentPositions.push_back(originSnapshot.Position); this->Locations.resize(this->Locations.size() + 1); |