summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-03-06 00:33:10 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-03-13 13:58:45 +0100
commita02db58fd50ef7fc2f0284852c6b3f98e458a232 (patch)
treeecb7b4ad3252064381414d39782a2e4222368843 /apt-pkg/pkgcache.h
parent453b82a388013e522b3a1b9fcd6ed0810dab1f4f (diff)
follow method attribute suggestions by gcc
Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn}
Diffstat (limited to 'apt-pkg/pkgcache.h')
-rw-r--r--apt-pkg/pkgcache.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index b3a714511..5e8a9630a 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -74,9 +74,11 @@
#ifndef PKGLIB_PKGCACHE_H
#define PKGLIB_PKGCACHE_H
+#include <apt-pkg/mmap.h>
+#include <apt-pkg/macros.h>
+
#include <string>
#include <time.h>
-#include <apt-pkg/mmap.h>
#ifndef APT_8_CLEANER_HEADERS
using std::string;
@@ -156,8 +158,8 @@ class pkgCache /*{{{*/
std::string CacheFile;
MMap &Map;
- unsigned long sHash(const std::string &S) const;
- unsigned long sHash(const char *S) const;
+ unsigned long sHash(const std::string &S) const APT_PURE;
+ unsigned long sHash(const char *S) const APT_PURE;
public:
@@ -207,8 +209,8 @@ class pkgCache /*{{{*/
pkgVersioningSystem *VS;
// Converters
- static const char *CompTypeDeb(unsigned char Comp);
- static const char *CompType(unsigned char Comp);
+ static const char *CompTypeDeb(unsigned char Comp) APT_CONST;
+ static const char *CompType(unsigned char Comp) APT_CONST;
static const char *DepType(unsigned char Dep);
pkgCache(MMap *Map,bool DoMap = true);
@@ -318,7 +320,7 @@ struct pkgCache::Header
/** \brief Size of the complete cache file */
unsigned long CacheFileSize;
- bool CheckSizes(Header &Against) const;
+ bool CheckSizes(Header &Against) const APT_PURE;
Header();
};
/*}}}*/