about summary refs log tree commit diff
path: root/src/libutil/serialise.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/serialise.hh')
-rw-r--r--src/libutil/serialise.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/serialise.hh b/src/libutil/serialise.hh
index 75d17bc60502..5746c3c2fcf9 100644
--- a/src/libutil/serialise.hh
+++ b/src/libutil/serialise.hh
@@ -80,9 +80,9 @@ struct StringSink : Sink
 /* A source that reads data from a string. */
 struct StringSource : Source
 {
-    string & s;
+    const string & s;
     unsigned int pos;
-    StringSource(string & _s) : s(_s), pos(0) { }
+    StringSource(const string & _s) : s(_s), pos(0) { }
     virtual void operator () (unsigned char * data, unsigned int len)
     {
         s.copy((char *) data, len, pos);