Using PathView to pass paths to APIs
This commit is contained in:
+2
-2
@@ -210,7 +210,7 @@ CRC32StreamResult crc32Stream(IStreamSource& source, uint32_t crc, size_t buffer
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CRC32StreamResult crc32File(const IFilesystem& filesystem, const AbsPath& filePath, uint32_t crc, size_t bufferSize)
|
||||
CRC32StreamResult crc32File(const IFilesystem& filesystem, AbsPathView filePath, uint32_t crc, size_t bufferSize)
|
||||
{
|
||||
OUTCOME_TRY(const auto source, filesystem.openStreamSource(filePath, IFilesystem::SourceFlags(IFilesystem::SourceFlag::SequentialHint, IFilesystem::SourceFlag::Unbuffered)));
|
||||
return crc32Stream(*source, crc, bufferSize);
|
||||
@@ -245,7 +245,7 @@ CRC64StreamResult crc64Stream(IStreamSource& source, uint64_t crc, size_t buffer
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CRC64StreamResult crc64File(const IFilesystem& filesystem, const AbsPath& filePath, uint64_t crc, size_t bufferSize)
|
||||
CRC64StreamResult crc64File(const IFilesystem& filesystem, AbsPathView filePath, uint64_t crc, size_t bufferSize)
|
||||
{
|
||||
OUTCOME_TRY(const auto source, filesystem.openStreamSource(filePath, IFilesystem::SourceFlags(IFilesystem::SourceFlag::SequentialHint, IFilesystem::SourceFlag::Unbuffered)));
|
||||
return crc64Stream(*source, crc, bufferSize);
|
||||
|
||||
Reference in New Issue
Block a user