diff options
author | David Kalnischkies <david@kalnischkies.de> | 2014-11-06 12:53:59 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2014-11-08 14:26:00 +0100 |
commit | f105aaba433f5a8b9c4326dd0d704501bf07d1e5 (patch) | |
tree | e614eea939eedd34bfcb37e42c60261d2f654d60 /apt-pkg/deb/debmetaindex.h | |
parent | 60b64ffc3468579183abc1bac0179943d782a52e (diff) |
better non-virtual metaIndex.LocalFileName() implementation
We can't add a new virtual method without breaking the ABI, but we can
freely add new methods, so for older ABIs we just implement this method
with a dynamic_cast, so that clients can be more ignorant about the API
here and especially don't need to pull a very dirty trick by assuming
internal knowledge (like apt-get did here).
Diffstat (limited to 'apt-pkg/deb/debmetaindex.h')
-rw-r--r-- | apt-pkg/deb/debmetaindex.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h index 3d35401ec..4a8e454c7 100644 --- a/apt-pkg/deb/debmetaindex.h +++ b/apt-pkg/deb/debmetaindex.h @@ -54,8 +54,9 @@ class debReleaseIndex : public metaIndex { std::string MetaIndexURI(const char *Type) const; #if APT_PKG_ABI >= 413 - virtual std::string LocalFileName() const; + virtual #endif + std::string LocalFileName() const; std::string IndexURI(const char *Type, std::string const &Section, std::string const &Arch="native") const; std::string IndexURISuffix(const char *Type, std::string const &Section, std::string const &Arch="native") const; |