From e788a834ce421042e727b72e43177edaa47e53a7 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 27 Feb 2014 02:18:11 +0100 Subject: warning: useless cast to type A [-Wuseless-cast] Git-Dch: Ignore Reported-By: gcc -Wuseless-cast --- apt-pkg/acquire-item.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'apt-pkg/acquire-item.cc') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index de03011bf..88b10d4b1 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -709,7 +709,7 @@ bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/ } // queue the right diff - Desc.URI = string(RealURI) + ".diff/" + available_patches[0].file + ".gz"; + Desc.URI = RealURI + ".diff/" + available_patches[0].file + ".gz"; Desc.Description = Description + " " + available_patches[0].file + string(".pdiff"); DestFile = _config->FindDir("Dir::State::lists") + "partial/"; DestFile += URItoFileName(RealURI + ".diff/" + available_patches[0].file); @@ -797,7 +797,7 @@ pkgAcqIndexMergeDiffs::pkgAcqIndexMergeDiffs(pkgAcquire *Owner, Desc.Owner = this; Desc.ShortDesc = ShortDesc; - Desc.URI = string(RealURI) + ".diff/" + patch.file + ".gz"; + Desc.URI = RealURI + ".diff/" + patch.file + ".gz"; Desc.Description = Description + " " + patch.file + string(".pdiff"); DestFile = _config->FindDir("Dir::State::lists") + "partial/"; DestFile += URItoFileName(RealURI + ".diff/" + patch.file); @@ -1558,7 +1558,7 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify) /*{{{*/ { std::vector types = APT::Configuration::getCompressionTypes(); for (std::vector::const_iterator t = types.begin(); t != types.end(); ++t) - if (MetaIndexParser->Exists(string((*Target)->MetaKey).append(".").append(*t)) == true) + if (MetaIndexParser->Exists((*Target)->MetaKey + "." + *t) == true) { compressedAvailable = true; break; @@ -1596,7 +1596,7 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify) /*{{{*/ else if (transInRelease == false || Record != NULL || compressedAvailable == true) { if (_config->FindB("Acquire::PDiffs",true) == true && transInRelease == true && - MetaIndexParser->Exists(string((*Target)->MetaKey).append(".diff/Index")) == true) + MetaIndexParser->Exists((*Target)->MetaKey + ".diff/Index") == true) new pkgAcqDiffIndex(Owner, (*Target)->URI, (*Target)->Description, (*Target)->ShortDesc, ExpectedIndexHash); else @@ -1610,7 +1610,7 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify) /*{{{*/ in the Meta-Index file. Ideal would be if pkgAcqDiffIndex would test this instead, but passing the required info to it is to much hassle */ if(_config->FindB("Acquire::PDiffs",true) == true && (verify == false || - MetaIndexParser->Exists(string((*Target)->MetaKey).append(".diff/Index")) == true)) + MetaIndexParser->Exists((*Target)->MetaKey + ".diff/Index") == true)) new pkgAcqDiffIndex(Owner, (*Target)->URI, (*Target)->Description, (*Target)->ShortDesc, ExpectedIndexHash); else @@ -1635,7 +1635,7 @@ bool pkgAcqMetaIndex::VerifyVendor(string Message) /*{{{*/ missingkeys += (Fingerprint); } if(!missingkeys.empty()) - _error->Warning("%s", string(msg+missingkeys).c_str()); + _error->Warning("%s", (msg + missingkeys).c_str()); string Transformed = MetaIndexParser->GetExpectedDist(); -- cgit v1.2.3