summaryrefslogtreecommitdiffstats
path: root/Source/cmStateSnapshot.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-11-07 19:33:06 (GMT)
committerBrad King <brad.king@kitware.com>2022-11-07 19:36:46 (GMT)
commit96ddcbee60ee304efd047bc0e20cf89066877ab5 (patch)
treee894c23a55711709f90ca022ef289694f433d678 /Source/cmStateSnapshot.cxx
parentcb53d9309eb932e40fcdf3609eb050358ede2d17 (diff)
downloadCMake-96ddcbee60ee304efd047bc0e20cf89066877ab5.zip
CMake-96ddcbee60ee304efd047bc0e20cf89066877ab5.tar.gz
CMake-96ddcbee60ee304efd047bc0e20cf89066877ab5.tar.bz2
cmState: Clarify name of member tracking the active scope in a directory
The `DirectoryEnd` member added by commit 52dbe654de (cmState: Record the end position of each directory., 2015-08-01, v3.4.0-rc1~251^2~1) actually tracks the current top-most scope in a directory's stack. This is evidenced by the use case in commit 3f4e5e8c3d (cmState: Return end snapshot for GetBuildsystemDirectoryParent., 2015-09-01, v3.4.0-rc1~100^2~1). Rename the member to `CurrentScope` to clarify this role.
Diffstat (limited to 'Source/cmStateSnapshot.cxx')
-rw-r--r--Source/cmStateSnapshot.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx
index c51650a..cb5f11f 100644
--- a/Source/cmStateSnapshot.cxx
+++ b/Source/cmStateSnapshot.cxx
@@ -64,7 +64,7 @@ bool cmStateSnapshot::IsValid() const
cmStateSnapshot cmStateSnapshot::GetBuildsystemDirectory() const
{
- return { this->State, this->Position->BuildSystemDirectory->DirectoryEnd };
+ return { this->State, this->Position->BuildSystemDirectory->CurrentScope };
}
cmStateSnapshot cmStateSnapshot::GetBuildsystemDirectoryParent() const
@@ -76,7 +76,7 @@ cmStateSnapshot cmStateSnapshot::GetBuildsystemDirectoryParent() const
cmStateDetail::PositionType parentPos = this->Position->DirectoryParent;
if (parentPos != this->State->SnapshotData.Root()) {
snapshot = cmStateSnapshot(this->State,
- parentPos->BuildSystemDirectory->DirectoryEnd);
+ parentPos->BuildSystemDirectory->CurrentScope);
}
return snapshot;
@@ -177,9 +177,9 @@ cmPolicies::PolicyStatus cmStateSnapshot::GetPolicy(cmPolicies::PolicyID id,
while (true) {
assert(dir.IsValid());
cmLinkedTree<cmStateDetail::PolicyStackEntry>::iterator leaf =
- dir->DirectoryEnd->Policies;
+ dir->CurrentScope->Policies;
cmLinkedTree<cmStateDetail::PolicyStackEntry>::iterator root =
- dir->DirectoryEnd->PolicyRoot;
+ dir->CurrentScope->PolicyRoot;
for (; leaf != root; ++leaf) {
if (parent_scope) {
parent_scope = false;
@@ -190,7 +190,7 @@ cmPolicies::PolicyStatus cmStateSnapshot::GetPolicy(cmPolicies::PolicyID id,
return status;
}
}
- cmStateDetail::PositionType e = dir->DirectoryEnd;
+ cmStateDetail::PositionType e = dir->CurrentScope;
cmStateDetail::PositionType p = e->DirectoryParent;
if (p == this->State->SnapshotData.Root()) {
break;