From e7e10e47476606e3b2274cf66b1e8ea74b236757 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 24 Oct 2015 22:43:37 +0200 Subject: deduplicate main methods All mains pretty much do the same thing, so lets try a little harder to move the common parts into -private to have the real differences more visible. Git-Dch: Ignore --- apt-pkg/contrib/cmndline.cc | 2 +- apt-pkg/contrib/cmndline.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/contrib/cmndline.cc b/apt-pkg/contrib/cmndline.cc index 60ce90f1f..d299bbbdf 100644 --- a/apt-pkg/contrib/cmndline.cc +++ b/apt-pkg/contrib/cmndline.cc @@ -411,7 +411,7 @@ unsigned int CommandLine::FileSize() const } /*}}}*/ // CommandLine::DispatchArg - Do something with the first arg /*{{{*/ -bool CommandLine::DispatchArg(DispatchWithHelp *Map,bool NoMatch) +bool CommandLine::DispatchArg(DispatchWithHelp const * const Map,bool NoMatch) { int I; for (I = 0; Map[I].Match != 0; I++) diff --git a/apt-pkg/contrib/cmndline.h b/apt-pkg/contrib/cmndline.h index a698a18b8..33d9f9f3a 100644 --- a/apt-pkg/contrib/cmndline.h +++ b/apt-pkg/contrib/cmndline.h @@ -85,7 +85,7 @@ class CommandLine void ShowHelp(); unsigned int FileSize() const APT_PURE; bool DispatchArg(Dispatch *List,bool NoMatch = true); - bool DispatchArg(DispatchWithHelp *List,bool NoMatch = true); + bool DispatchArg(DispatchWithHelp const * const List,bool NoMatch = true); static char const * GetCommand(Dispatch const * const Map, unsigned int const argc, char const * const * const argv) APT_PURE; -- cgit v1.2.3