diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2017-06-02 18:32:58 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2017-06-03 06:38:51 (GMT) |
commit | 8d7b3ef5d42c07dffe1f84af14b0055d288e4376 (patch) | |
tree | 5b7a772ab56138a24ada6c3a103e5c37863be32b /Source/cmFindPackageCommand.cxx | |
parent | 0068224fdd7569f02dffe9fd8de2e6ce0c7abc28 (diff) | |
download | CMake-8d7b3ef5d42c07dffe1f84af14b0055d288e4376.zip CMake-8d7b3ef5d42c07dffe1f84af14b0055d288e4376.tar.gz CMake-8d7b3ef5d42c07dffe1f84af14b0055d288e4376.tar.bz2 |
Provide and use CM_FALLTHROUGH
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 21ca347..65670e5 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -423,13 +423,17 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args, &parsed_minor, &parsed_patch, &parsed_tweak); switch (this->VersionCount) { case 4: - this->VersionTweak = parsed_tweak; // no break! + this->VersionTweak = parsed_tweak; + CM_FALLTHROUGH; case 3: - this->VersionPatch = parsed_patch; // no break! + this->VersionPatch = parsed_patch; + CM_FALLTHROUGH; case 2: - this->VersionMinor = parsed_minor; // no break! + this->VersionMinor = parsed_minor; + CM_FALLTHROUGH; case 1: - this->VersionMajor = parsed_major; // no break! + this->VersionMajor = parsed_major; + CM_FALLTHROUGH; default: break; } @@ -1542,13 +1546,17 @@ bool cmFindPackageCommand::CheckVersionFile(std::string const& version_file, &parsed_minor, &parsed_patch, &parsed_tweak); switch (this->VersionFoundCount) { case 4: - this->VersionFoundTweak = parsed_tweak; // no break! + this->VersionFoundTweak = parsed_tweak; + CM_FALLTHROUGH; case 3: - this->VersionFoundPatch = parsed_patch; // no break! + this->VersionFoundPatch = parsed_patch; + CM_FALLTHROUGH; case 2: - this->VersionFoundMinor = parsed_minor; // no break! + this->VersionFoundMinor = parsed_minor; + CM_FALLTHROUGH; case 1: - this->VersionFoundMajor = parsed_major; // no break! + this->VersionFoundMajor = parsed_major; + CM_FALLTHROUGH; default: break; } |