cmMakefile: Remove unneeded check

Don't check whether the variable watch is null before returning either
the variable watch or `nullptr`, as that is clearly redundant.
This commit is contained in:
Matthew Woehlke
2026-02-13 14:24:34 -05:00
parent 961ed3f2e9
commit bcb62c875a
+1 -2
View File
@@ -3370,8 +3370,7 @@ cmGlobalGenerator* cmMakefile::GetGlobalGenerator() const
#ifndef CMAKE_BOOTSTRAP
cmVariableWatch* cmMakefile::GetVariableWatch() const
{
if (this->GetCMakeInstance() &&
this->GetCMakeInstance()->GetVariableWatch()) {
if (this->GetCMakeInstance()) {
return this->GetCMakeInstance()->GetVariableWatch();
}
return nullptr;