Remove now-obsolete casts.

This commit is contained in:
Stephen Kelly 2015-10-14 23:44:21 +02:00
parent 4ee2b26708
commit 38df5c36d6
7 changed files with 9 additions and 11 deletions

View File

@ -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];

View File

@ -1632,7 +1632,7 @@ struct TargetFilesystemArtifactResultCreator<ArtifactPdbTag>
return std::string();
}
cmState::TargetType targetType = (cmState::TargetType)target->GetType();
cmState::TargetType targetType = target->GetType();
if(targetType != cmState::SHARED_LIBRARY &&
targetType != cmState::MODULE_LIBRARY &&

View File

@ -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;
}

View File

@ -94,8 +94,7 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
std::vector<std::string> filesFrom;
std::vector<std::string> filesTo;
std::string literal_args;
cmState::TargetType targetType =
static_cast<cmState::TargetType>(this->Target->GetType());
cmState::TargetType targetType = this->Target->GetType();
cmInstallType type = cmInstallType();
switch(targetType)
{

View File

@ -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.

View File

@ -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";

View File

@ -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;