1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:37:43 +00:00

LibVideo: Migrate to east-const style & apply other minor fixes

This patch brings all of LibVideo up to the east-const style in the
project. Additionally, it applies a few fixes from the reviews in #8170
that referred to older LibVideo code.
This commit is contained in:
FalseHonesty 2021-06-20 10:37:33 -04:00 committed by Andreas Kling
parent 7d4053dde1
commit 988e17ed05
12 changed files with 48 additions and 50 deletions

View file

@ -41,7 +41,7 @@ constexpr u32 BIT_DEPTH_ID = 0x6264;
constexpr u32 SIMPLE_BLOCK_ID = 0xA3;
constexpr u32 TIMESTAMP_ID = 0xE7;
OwnPtr<MatroskaDocument> MatroskaReader::parse_matroska_from_file(const StringView& path)
OwnPtr<MatroskaDocument> MatroskaReader::parse_matroska_from_file(StringView const& path)
{
auto mapped_file_result = MappedFile::map(path);
if (mapped_file_result.is_error())
@ -51,7 +51,7 @@ OwnPtr<MatroskaDocument> MatroskaReader::parse_matroska_from_file(const StringVi
return parse_matroska_from_data((u8*)mapped_file->data(), mapped_file->size());
}
OwnPtr<MatroskaDocument> MatroskaReader::parse_matroska_from_data(const u8* data, size_t size)
OwnPtr<MatroskaDocument> MatroskaReader::parse_matroska_from_data(u8 const* data, size_t size)
{
MatroskaReader reader(data, size);
return reader.parse();
@ -83,7 +83,7 @@ OwnPtr<MatroskaDocument> MatroskaReader::parse()
return matroska_document;
}
bool MatroskaReader::parse_master_element([[maybe_unused]] const StringView& element_name, Function<bool(u64)> element_consumer)
bool MatroskaReader::parse_master_element([[maybe_unused]] StringView const& element_name, Function<bool(u64)> element_consumer)
{
auto element_data_size = m_streamer.read_variable_size_integer();
CHECK_HAS_VALUE(element_data_size);