summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-11-15 19:58:52 (GMT)
committerBrad King <brad.king@kitware.com>2023-11-17 23:43:01 (GMT)
commit1487e540aa2bc069a7d156a3ad884e98edfb8815 (patch)
tree0781fc10346e31641fd88e103398d33fc141661e /Source
parentb02b628ad9b7c59f703c42fdc238c9f11d277937 (diff)
downloadCMake-1487e540aa2bc069a7d156a3ad884e98edfb8815.zip
CMake-1487e540aa2bc069a7d156a3ad884e98edfb8815.tar.gz
CMake-1487e540aa2bc069a7d156a3ad884e98edfb8815.tar.bz2
cmCTestMultiProcessHandler: Reduce repeat test property map lookups
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 61582d1..bee8735 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -398,21 +398,21 @@ void cmCTestMultiProcessHandler::SetStopTimePassed()
void cmCTestMultiProcessHandler::LockResources(int index)
{
- this->LockedResources.insert(
- this->Properties[index]->LockedResources.begin(),
- this->Properties[index]->LockedResources.end());
-
- if (this->Properties[index]->RunSerial) {
+ auto* properties = this->Properties[index];
+ this->LockedResources.insert(properties->LockedResources.begin(),
+ properties->LockedResources.end());
+ if (properties->RunSerial) {
this->SerialTestRunning = true;
}
}
void cmCTestMultiProcessHandler::UnlockResources(int index)
{
- for (std::string const& i : this->Properties[index]->LockedResources) {
+ auto* properties = this->Properties[index];
+ for (std::string const& i : properties->LockedResources) {
this->LockedResources.erase(i);
}
- if (this->Properties[index]->RunSerial) {
+ if (properties->RunSerial) {
this->SerialTestRunning = false;
}
}