summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.h
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/pkgcachegen.h')
-rw-r--r--apt-pkg/pkgcachegen.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h
index d088bca52..c042625c4 100644
--- a/apt-pkg/pkgcachegen.h
+++ b/apt-pkg/pkgcachegen.h
@@ -40,7 +40,10 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/
APT_HIDDEN map_stringitem_t WriteStringInMap(APT::StringView String) { return WriteStringInMap(String.data(), String.size()); };
APT_HIDDEN map_stringitem_t WriteStringInMap(const char *String);
APT_HIDDEN map_stringitem_t WriteStringInMap(const char *String, const unsigned long &Len);
- APT_HIDDEN map_pointer<void> AllocateInMap(const unsigned long &size);
+ APT_HIDDEN uint32_t AllocateInMap(const unsigned long &size);
+ template<typename T> map_pointer<T> AllocateInMap() {
+ return map_pointer<T>{AllocateInMap(sizeof(T))};
+ }
// Dirty hack for public users that do not use C++11 yet
#if __cplusplus >= 201103L