diff options
| author | Stefan Boberg <[email protected]> | 2021-09-23 13:40:10 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-23 13:40:10 +0200 |
| commit | 4842881e1b2924a1d5dcac7b7e6da6dcc7558456 (patch) | |
| tree | 16e91b9a1da92ca512ef9aa4947fa772ffada861 /zencore/iobuffer.cpp | |
| parent | Merge branch 'main' of https://github.com/EpicGames/zen (diff) | |
| download | zen-4842881e1b2924a1d5dcac7b7e6da6dcc7558456.tar.xz zen-4842881e1b2924a1d5dcac7b7e6da6dcc7558456.zip | |
Added HashBuffer(IoBuffer&) overload with trivial (but inappropriate for the longer term) implementation
Diffstat (limited to 'zencore/iobuffer.cpp')
| -rw-r--r-- | zencore/iobuffer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/zencore/iobuffer.cpp b/zencore/iobuffer.cpp index bcecc768f..dc998d5ea 100644 --- a/zencore/iobuffer.cpp +++ b/zencore/iobuffer.cpp @@ -4,6 +4,7 @@ #include <zencore/filesystem.h> #include <zencore/fmtutils.h> +#include <zencore/iohash.h> #include <zencore/logging.h> #include <zencore/memory.h> #include <zencore/testing.h> @@ -381,6 +382,13 @@ IoBufferBuilder::MakeFromTemporaryFile(const wchar_t* FileName) return {}; } +IoHash +HashBuffer(IoBuffer& Buffer) +{ + // TODO: handle disk buffers with special path + return IoHash::HashBuffer(Buffer.Data(), Buffer.Size()); +} + ////////////////////////////////////////////////////////////////////////// #if ZEN_WITH_TESTS |