diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-01-28 21:10:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-08-25 13:47:26 (GMT) |
commit | 2af853deb5225a9c8cb3d1e6311680c3fb7d86aa (patch) | |
tree | f5728597309b170b4b99b2c84596446ed651bf4e /Source | |
parent | 33bb9cfa365f494bb76ff9c2c78ad625e77152ec (diff) | |
download | CMake-2af853deb5225a9c8cb3d1e6311680c3fb7d86aa.zip CMake-2af853deb5225a9c8cb3d1e6311680c3fb7d86aa.tar.gz CMake-2af853deb5225a9c8cb3d1e6311680c3fb7d86aa.tar.bz2 |
cmMakefile: Simplify IssueMessage implementation
It is only called during configure time when the execution stack is
non-empty.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 8 |
1 files 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()); } |