From 38df5c36d66313a5dd7859c1c55a41f60f141b13 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 14 Oct 2015 23:44:21 +0200 Subject: [PATCH] Remove now-obsolete casts. --- Source/cmComputeTargetDepends.cxx | 2 +- Source/cmGeneratorExpressionNode.cxx | 2 +- Source/cmGeneratorTarget.cxx | 4 ++-- Source/cmInstallTargetGenerator.cxx | 3 +-- Source/cmNinjaNormalTargetGenerator.cxx | 4 ++-- Source/cmNinjaTargetGenerator.cxx | 2 +- Source/cmVisualStudio10TargetGenerator.cxx | 3 +-- 7 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index 05fc800f6..138e63026 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -555,7 +555,7 @@ cmComputeTargetDepends // Describe the depender. e << " \"" << depender->GetName() << "\" of type " << cmTarget::GetTargetTypeName( - (cmState::TargetType)depender->GetType()) << "\n"; + depender->GetType()) << "\n"; // List its dependencies that are inside the component. EdgeList const& nl = this->InitialGraph[i]; diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index aa6f54b51..e3253da04 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1632,7 +1632,7 @@ struct TargetFilesystemArtifactResultCreator return std::string(); } - cmState::TargetType targetType = (cmState::TargetType)target->GetType(); + cmState::TargetType targetType = target->GetType(); if(targetType != cmState::SHARED_LIBRARY && targetType != cmState::MODULE_LIBRARY && diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index dc02734b6..f5c51914e 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1965,7 +1965,7 @@ cmGeneratorTarget::CompileInfo const* cmGeneratorTarget::GetCompileInfo( std::string msg = "cmTarget::GetCompileInfo called for "; msg += this->GetName(); msg += " which has type "; - msg += cmTarget::GetTargetTypeName((cmState::TargetType)this->GetType()); + msg += cmTarget::GetTargetTypeName(this->GetType()); this->LocalGenerator->IssueMessage(cmake::INTERNAL_ERROR, msg); return 0; } @@ -4697,7 +4697,7 @@ cmGeneratorTarget::OutputInfo const* cmGeneratorTarget::GetOutputInfo( std::string msg = "cmGeneratorTarget::GetOutputInfo called for "; msg += this->GetName(); msg += " which has type "; - msg += cmTarget::GetTargetTypeName(cmState::TargetType(this->GetType())); + msg += cmTarget::GetTargetTypeName(this->GetType()); this->LocalGenerator->IssueMessage(cmake::INTERNAL_ERROR, msg); return 0; } diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 66b6fc7fa..2f081652b 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -94,8 +94,7 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os, std::vector filesFrom; std::vector filesTo; std::string literal_args; - cmState::TargetType targetType = - static_cast(this->Target->GetType()); + cmState::TargetType targetType = this->Target->GetType(); cmInstallType type = cmInstallType(); switch(targetType) { diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index b5648fe50..c5dfe2d61 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -157,7 +157,7 @@ cmNinjaNormalTargetGenerator return this->TargetLinkLanguage + "_" + cmTarget::GetTargetTypeName( - (cmState::TargetType)this->GetGeneratorTarget()->GetType()) + this->GetGeneratorTarget()->GetType()) + "_LINKER__" + cmGlobalNinjaGenerator::EncodeRuleName(this->GetTarget()->GetName()) ; @@ -168,7 +168,7 @@ cmNinjaNormalTargetGenerator ::WriteLinkRule(bool useResponseFile) { cmState::TargetType targetType = - (cmState::TargetType)this->GetGeneratorTarget()->GetType(); + this->GetGeneratorTarget()->GetType(); std::string ruleName = this->LanguageLinkerRule(); // Select whether to use a response file for objects. diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 1028196bd..0d6afff04 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -481,7 +481,7 @@ cmNinjaTargetGenerator this->GetBuildFileStream() << "# Object build statements for " << cmTarget::GetTargetTypeName( - (cmState::TargetType)this->GetGeneratorTarget()->GetType()) + this->GetGeneratorTarget()->GetType()) << " target " << this->GetTargetName() << "\n\n"; diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 1b62821b2..6abac5d41 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1743,8 +1743,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions() { - cmState::TargetType ttype = - (cmState::TargetType)this->GeneratorTarget->GetType(); + cmState::TargetType ttype = this->GeneratorTarget->GetType(); if(ttype > cmState::GLOBAL_TARGET) { return;