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 --- cmdline/apt-config.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc index ef1e95de1..4e546b098 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -128,7 +128,7 @@ int main(int argc,const char *argv[]) /*{{{*/ _config->Set(comp + "Name", c->Name); _config->Set(comp + "Extension", c->Extension); _config->Set(comp + "Binary", c->Binary); - _config->Set(std::string(comp + "Cost").c_str(), c->Cost); + _config->Set((comp + "Cost").c_str(), c->Cost); for (std::vector::const_iterator a = c->CompressArgs.begin(); a != c->CompressArgs.end(); ++a) _config->Set(comp + "CompressArg::", *a); for (std::vector::const_iterator a = c->UncompressArgs.begin(); a != c->UncompressArgs.end(); ++a) -- cgit v1.2.3