summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2015-12-27 15:33:59 +0100
committerJulian Andres Klode <jak@debian.org>2015-12-27 15:43:13 +0100
commitea58d39ee3b71b02ddfd134412adc99e7b09605d (patch)
treeee4124d68b601e60e7b60b01bda2e73349cb789f /apt-pkg/contrib
parent38dba8cd72be4d47a5590dd4bb84845fd341869e (diff)
fileutl: simple_buffer: Mark accessors as const
Suggested by David. Gbp-Dch: ignore
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r--apt-pkg/contrib/fileutl.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index b1f1c78a2..38ae0246e 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -925,9 +925,10 @@ struct APT_HIDDEN simple_buffer { /*{{{*/
unsigned long long bufferend = 0;
char buffer[buffersize_max];
+ const char *get() const { return buffer + bufferstart; }
char *get() { return buffer + bufferstart; }
- bool empty() { return bufferend <= bufferstart; }
- unsigned long long size() { return bufferend-bufferstart; }
+ bool empty() const { return bufferend <= bufferstart; }
+ unsigned long long size() const { return bufferend-bufferstart; }
void reset() { bufferend = bufferstart = 0; }
ssize_t read(void *to, unsigned long long requested_size) APT_MUSTCHECK
{