X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/1dd20368486820efb6ef4476ad739e967174bec4..5f17b19f8f99eb6f80a10846d5891f53c16178dc:/ftparchive/apt-ftparchive.cc diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc index c7e38badf..d985646f7 100644 --- a/ftparchive/apt-ftparchive.cc +++ b/ftparchive/apt-ftparchive.cc @@ -615,7 +615,7 @@ static void LoadBinDir(vector &PkgList,Configuration &Setup) } /*}}}*/ -bool ShowHelp(CommandLine &) /*{{{*/ +static bool ShowHelp(CommandLine &) /*{{{*/ { std::cout << _("Usage: apt-ftparchive [options] command\n" @@ -819,12 +819,12 @@ static bool DoGeneratePackagesAndSources(Configuration &Setup, _error->DumpErrors(); // Do the generation for Packages - for (End = List; End->Str != 0; End++) + for (End = List; End->Str != 0; ++End) { if (End->Hit == false) continue; - PackageMap *I = (PackageMap *)End->UserData; + PackageMap * const I = static_cast(End->UserData); if (I->PkgDone == true) continue; if (I->GenPackages(Setup,Stats) == false) @@ -832,12 +832,12 @@ static bool DoGeneratePackagesAndSources(Configuration &Setup, } // Do the generation for Sources - for (End = List; End->Str != 0; End++) + for (End = List; End->Str != 0; ++End) { if (End->Hit == false) continue; - PackageMap *I = (PackageMap *)End->UserData; + PackageMap * const I = static_cast(End->UserData); if (I->SrcDone == true) continue; if (I->GenSources(Setup,SrcStats) == false) @@ -1029,7 +1029,7 @@ static bool Clean(CommandLine &CmdL) } /*}}}*/ -std::vector GetCommands() /*{{{*/ +static std::vector GetCommands() /*{{{*/ { return { {"packages",&SimpleGenPackages, nullptr}, @@ -1048,7 +1048,7 @@ int main(int argc, const char *argv[]) /*{{{*/ // Parse the command line and initialize the package library CommandLine CmdL; - auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_FTPARCHIVE, &_config, NULL, argc, argv); + auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_FTPARCHIVE, &_config, NULL, argc, argv, ShowHelp, &GetCommands); _config->CndSet("quiet",0); Quiet = _config->FindI("quiet",0);