diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-06-09 07:57:47 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-06-12 20:09:27 (GMT) |
commit | 23f87e8157770c56d3aa568f3d1318f9b9070364 (patch) | |
tree | 89f980aa45d40f513a42d5cc0e39b48ede696f07 /Source/cmMakefile.cxx | |
parent | 54c65d5fb22c3cc53ecd707687c2f25b1643726b (diff) | |
download | CMake-23f87e8157770c56d3aa568f3d1318f9b9070364.zip CMake-23f87e8157770c56d3aa568f3d1318f9b9070364.tar.gz CMake-23f87e8157770c56d3aa568f3d1318f9b9070364.tar.bz2 |
cmake: Remove force from IssueMessage API
The force parameter is ugly and makes the method harder to reason about
(issues the message ... but maybe it doesn't ... but then again you can
force it). It is a violation of
https://en.wikipedia.org/wiki/Interface_segregation_principle
and is the kind of thing described in a recent blog here:
http://code.joejag.com/2016/anti-if-the-missing-patterns.html
"Any time you see this you actually have two methods bundled into one.
That boolean represents an opportunity to name a concept in your code."
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index ca30b3d..00ff5ac 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -105,8 +105,8 @@ cmMakefile::~cmMakefile() cmDeleteAll(this->EvaluationFiles); } -void cmMakefile::IssueMessage(cmake::MessageType t, std::string const& text, - bool force) const +void cmMakefile::IssueMessage(cmake::MessageType t, + std::string const& text) const { // Collect context information. if (!this->ExecutionStatusStack.empty()) { @@ -114,7 +114,7 @@ void cmMakefile::IssueMessage(cmake::MessageType t, std::string const& text, this->ExecutionStatusStack.back()->SetNestedError(true); } } - this->GetCMakeInstance()->IssueMessage(t, text, this->GetBacktrace(), force); + this->GetCMakeInstance()->IssueMessage(t, text, this->GetBacktrace()); } cmStringRange cmMakefile::GetIncludeDirectoriesEntries() const |