Skip to content

Commit 31c8891

Browse files
committed
OrcLib: Ntfs: Compression: Wof: use Parse pattern
1 parent c3757de commit 31c8891

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/OrcLib/Filesystem/Ntfs/Attribute/ReparsePoint/WofReparsePoint.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ Result<WofReparsePoint> WofReparsePoint::Parse(BufferView buffer)
2121
return std::make_error_code(std::errc::message_size);
2222
}
2323

24-
return WofReparsePoint(*reinterpret_cast<const WofReparsePoint::Layout*>(buffer.data()));
24+
return WofReparsePoint::Parse(*reinterpret_cast<const WofReparsePoint::Layout*>(buffer.data()));
2525
}
2626

27-
Result<WofReparsePoint> WofReparsePoint::Parse(WofReparsePoint::Layout& layout)
27+
Result<WofReparsePoint> WofReparsePoint::Parse(const WofReparsePoint::Layout& layout)
2828
{
2929
if (layout.version != 1)
3030
{

src/OrcLib/Filesystem/Ntfs/Attribute/ReparsePoint/WofReparsePoint.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class WofReparsePoint
3737
#pragma pack(pop)
3838

3939
static Result<WofReparsePoint> Parse(BufferView buffer);
40-
static Result<WofReparsePoint> Parse(WofReparsePoint::Layout& layout);
40+
static Result<WofReparsePoint> Parse(const WofReparsePoint::Layout& layout);
4141

4242
WofReparsePoint(const WofReparsePoint::Layout& header);
4343

src/OrcLib/Filesystem/Ntfs/Compression/WofChunks.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void WofChunks::ParseLocations(BufferView buffer, gsl::span<ChunkLocation> table
8585
{
8686
ec = std::make_error_code(std::errc::message_size);
8787
Log::Debug(
88-
"Failed to parse chunk offset table: input buffer is too small (expected: {}, actual: {})",
88+
"Failed to parse chunk offset table: input buffer is too small (expected: {}, got: {})",
8989
expectedBufferSize,
9090
buffer.size());
9191
return;
@@ -95,7 +95,7 @@ void WofChunks::ParseLocations(BufferView buffer, gsl::span<ChunkLocation> table
9595
{
9696
ec = std::make_error_code(std::errc::message_size);
9797
Log::Debug(
98-
"Failed to parse chunk offset table: output table is too small (expected: {}, actual: {})",
98+
"Failed to parse chunk offset table: output table is too small (expected: {}, got: {})",
9999
m_chunkCount,
100100
table.size());
101101
return;

src/OrcLib/Filesystem/Ntfs/Compression/WofStreamConcept.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ class WofStreamConcept
309309
if (ec)
310310
{
311311
Log::Debug(
312-
"Failed to decompress chunk {}/{} (algorithm: {}, chunk size: {}, input size: {}, output size: {}) [{}]",
312+
"Failed to decompress chunk {}/{} (algorithm: {}, size: {}, buffer size: {}, output size: {}) [{}]",
313313
chunkIndex,
314314
m_chunks.ChunkCount(),
315315
ToString(m_chunks.Algorithm()),

0 commit comments

Comments
 (0)