From 2af853deb5225a9c8cb3d1e6311680c3fb7d86aa Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 28 Jan 2016 22:10:28 +0100 Subject: cmMakefile: Simplify IssueMessage implementation It is only called during configure time when the execution stack is non-empty. --- Source/cmMakefile.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index b9d71ec..d299b8b 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -115,11 +115,9 @@ cmMakefile::~cmMakefile() void cmMakefile::IssueMessage(cmake::MessageType t, std::string const& text) const { - // Collect context information. - if (!this->ExecutionStatusStack.empty()) { - if ((t == cmake::FATAL_ERROR) || (t == cmake::INTERNAL_ERROR)) { - this->ExecutionStatusStack.back()->SetNestedError(true); - } + assert(!this->ExecutionStatusStack.empty()); + if ((t == cmake::FATAL_ERROR) || (t == cmake::INTERNAL_ERROR)) { + this->ExecutionStatusStack.back()->SetNestedError(true); } this->GetCMakeInstance()->IssueMessage(t, text, this->GetBacktrace()); } -- cgit v0.12