summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/deblistparser.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-01-26 23:18:05 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-01-26 23:18:05 +0100
commit8efd5947bf7de0fc3db51b4871bcf3522018761d (patch)
tree698e9f3468b85227ca9a0fa7969a0b412baec361 /apt-pkg/deb/deblistparser.h
parent02ceb810fe0de9b267a8b6a302505967afce6b5a (diff)
convert Version() and Architecture() to APT::StringView
Part of hidden classes, so conversion is abi-free. Git-Dch: Ignore
Diffstat (limited to 'apt-pkg/deb/deblistparser.h')
-rw-r--r--apt-pkg/deb/deblistparser.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h
index 1c5275e0a..a78312f9d 100644
--- a/apt-pkg/deb/deblistparser.h
+++ b/apt-pkg/deb/deblistparser.h
@@ -69,9 +69,11 @@ class APT_HIDDEN debListParser : public pkgCacheListParser
// These all operate against the current section
virtual std::string Package() APT_OVERRIDE;
- virtual std::string Architecture() APT_OVERRIDE;
virtual bool ArchitectureAll() APT_OVERRIDE;
- virtual std::string Version() APT_OVERRIDE;
+#ifdef APT_PKG_EXPOSE_STRING_VIEW
+ virtual APT::StringView Architecture() APT_OVERRIDE;
+ virtual APT::StringView Version() APT_OVERRIDE;
+#endif
virtual bool NewVersion(pkgCache::VerIterator &Ver) APT_OVERRIDE;
virtual std::vector<std::string> AvailableDescriptionLanguages() APT_OVERRIDE;
virtual MD5SumValue Description_md5() APT_OVERRIDE;
@@ -128,9 +130,11 @@ class APT_HIDDEN debDebFileParser : public debListParser
class APT_HIDDEN debTranslationsParser : public debListParser
{
public:
+#ifdef APT_PKG_EXPOSE_STRING_VIEW
// a translation can never be a real package
- virtual std::string Architecture() APT_OVERRIDE { return ""; }
- virtual std::string Version() APT_OVERRIDE { return ""; }
+ virtual APT::StringView Architecture() APT_OVERRIDE { return ""; }
+ virtual APT::StringView Version() APT_OVERRIDE { return ""; }
+#endif
debTranslationsParser(FileFd *File)
: debListParser(File) {};