diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-07-29 16:18:10 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-07-29 16:18:10 +0200 |
commit | 15240f4b681ca35c669d2b2e6e34f8ee3f6c06d9 (patch) | |
tree | 4139050e3c2f00650a0d316c971c4e7b8aba3e58 /ftparchive/override.cc | |
parent | 34904390bd6901f3de90249938baa0b875873534 (diff) | |
parent | 1b8ba3ba050f01db27f1ddc0e5b280b2fccd9fb9 (diff) |
merged with the debian-experimental-ma branch
Diffstat (limited to 'ftparchive/override.cc')
-rw-r--r-- | ftparchive/override.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ftparchive/override.cc b/ftparchive/override.cc index 6f40bc865..3cf10b89b 100644 --- a/ftparchive/override.cc +++ b/ftparchive/override.cc @@ -24,7 +24,7 @@ // Override::ReadOverride - Read the override file /*{{{*/ // --------------------------------------------------------------------- /* This parses the override file and reads it into the map */ -bool Override::ReadOverride(string File,bool Source) +bool Override::ReadOverride(string const &File,bool const &Source) { if (File.empty() == true) return true; @@ -132,7 +132,7 @@ bool Override::ReadOverride(string File,bool Source) // Override::ReadExtraOverride - Read the extra override file /*{{{*/ // --------------------------------------------------------------------- /* This parses the extra override file and reads it into the map */ -bool Override::ReadExtraOverride(string File,bool Source) +bool Override::ReadExtraOverride(string const &File,bool const &Source) { if (File.empty() == true) return true; @@ -209,9 +209,9 @@ bool Override::ReadExtraOverride(string File,bool Source) /* Returns a override item for the given package and the given architecture. * Treats "all" special */ -Override::Item* Override::GetItem(string Package, string Architecture) +Override::Item* Override::GetItem(string const &Package, string const &Architecture) { - map<string,Item>::iterator I = Mapping.find(Package); + map<string,Item>::const_iterator I = Mapping.find(Package); map<string,Item>::iterator J = Mapping.find(Package + "/" + Architecture); if (I == Mapping.end() && J == Mapping.end()) @@ -230,7 +230,7 @@ Override::Item* Override::GetItem(string Package, string Architecture) if (R->Priority != "") result->Priority = R->Priority; if (R->OldMaint != "") result->OldMaint = R->OldMaint; if (R->NewMaint != "") result->NewMaint = R->NewMaint; - for (map<string,string>::iterator foI = R->FieldOverride.begin(); + for (map<string,string>::const_iterator foI = R->FieldOverride.begin(); foI != R->FieldOverride.end(); foI++) { result->FieldOverride[foI->first] = foI->second; @@ -247,7 +247,7 @@ Override::Item* Override::GetItem(string Package, string Architecture) there is a rule but it does not match then the empty string is returned, also if there was no rewrite rule the empty string is returned. Failed indicates if there was some kind of problem while rewriting. */ -string Override::Item::SwapMaint(string Orig,bool &Failed) +string Override::Item::SwapMaint(string const &Orig,bool &Failed) { Failed = false; @@ -262,10 +262,10 @@ string Override::Item::SwapMaint(string Orig,bool &Failed) override file. Thus it persists.*/ #if 1 // Break OldMaint up into little bits on double slash boundaries. - string::iterator End = OldMaint.begin(); + string::const_iterator End = OldMaint.begin(); while (1) { - string::iterator Start = End; + string::const_iterator Start = End; for (; End < OldMaint.end() && (End + 3 >= OldMaint.end() || End[0] != ' ' || End[1] != '/' || End[2] != '/'); End++); |