aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/archive.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-12-02 14:00:43 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-12-02 14:17:27 +0100
commitfaa31f40846f7a4dbc2487d000b112a6aef69d1b (patch)
tree37f34b2378c81d9f2bb8fc79046d12b4e0592647 /src/libutil/archive.hh
parentaa684861127eabc18a0d7386a66c5b75d4962897 (diff)
Sink: Use std::string_view
Diffstat (limited to 'src/libutil/archive.hh')
-rw-r--r--src/libutil/archive.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libutil/archive.hh b/src/libutil/archive.hh
index 5665732d2..fe22435ef 100644
--- a/src/libutil/archive.hh
+++ b/src/libutil/archive.hh
@@ -58,7 +58,7 @@ struct ParseSink
virtual void createRegularFile(const Path & path) { };
virtual void isExecutable() { };
virtual void preallocateContents(uint64_t size) { };
- virtual void receiveContents(unsigned char * data, size_t len) { };
+ virtual void receiveContents(std::string_view data) { };
virtual void createSymlink(const Path & path, const string & target) { };
};
@@ -72,14 +72,14 @@ struct RetrieveRegularNARSink : ParseSink
RetrieveRegularNARSink(Sink & sink) : sink(sink) { }
- void createDirectory(const Path & path)
+ void createDirectory(const Path & path) override
{
regular = false;
}
- void receiveContents(unsigned char * data, size_t len)
+ void receiveContents(std::string_view data) override
{
- sink(data, len);
+ sink(data);
}
void createSymlink(const Path & path, const string & target)