From 1adcf56bec7d2127d83aa423916639740fe8e586 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 13 Dec 2017 21:39:16 +0100 Subject: avoid some useless casts reported by -Wuseless-cast The casts are useless, but the reports show some where we can actually improve the code by replacing them with better alternatives like converting whatever int type into a string instead of casting to a specific one which might in the future be too small. Reported-By: gcc -Wuseless-cast --- apt-pkg/cdrom.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/cdrom.cc') diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index 4f57153f9..e4b0bef06 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -315,7 +315,7 @@ bool pkgCdrom::DropRepeats(vector &List,const char *Name) for (std::vector::const_iterator c = compressor.begin(); c != compressor.end(); ++c) { - std::string filename = std::string(List[I]).append(Name).append(c->Extension); + std::string const filename = List[I] + Name + c->Extension; if (stat(filename.c_str(), &Buf) != 0) continue; Inodes[I] = Buf.st_ino; -- cgit v1.2.3