From 8bac46508c52f708d61cc4c6512a3e97cc2ddfd5 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 7 Sep 2019 09:26:17 -0400 Subject: [PATCH] General: Be explicit about SeekOrigin type This will make turning SeekOrigin into an enum class a little smoother without breaking hecl. --- hecl/lib/Blender/SDNARead.cpp | 8 ++++---- hecl/lib/ClientProcess.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hecl/lib/Blender/SDNARead.cpp b/hecl/lib/Blender/SDNARead.cpp index 4bdcb9128..4b3e979bc 100644 --- a/hecl/lib/Blender/SDNARead.cpp +++ b/hecl/lib/Blender/SDNARead.cpp @@ -77,7 +77,7 @@ SDNARead::SDNARead(SystemStringView path) { atUint64 length = r.length(); char magicBuf[7]; r.readUBytesToBuf(magicBuf, 7); - r.seek(0, athena::Begin); + r.seek(0, athena::SeekOrigin::Begin); if (strncmp(magicBuf, "BLENDER", 7)) { /* Try gzip decompression */ std::unique_ptr compBuf(new uint8_t[4096]); @@ -169,15 +169,15 @@ BlendType GetBlendType(SystemStringView path) { r.enumerate( [idPropIdx, typeOffset, nameOffset, valOffset, &ret](const FileBlock& block, athena::io::MemoryReader& r) { if (block.type == FOURCC('DATA') && block.sdnaIdx == idPropIdx) { - r.seek(typeOffset, athena::Begin); + r.seek(typeOffset, athena::SeekOrigin::Begin); if (r.readUByte() != 1) return true; - r.seek(nameOffset, athena::Begin); + r.seek(nameOffset, athena::SeekOrigin::Begin); if (r.readString() != "hecl_type") return true; - r.seek(valOffset, athena::Begin); + r.seek(valOffset, athena::SeekOrigin::Begin); ret = BlendType(r.readUint32Little()); return false; } diff --git a/hecl/lib/ClientProcess.cpp b/hecl/lib/ClientProcess.cpp index ed8298a7d..5f2dcac16 100644 --- a/hecl/lib/ClientProcess.cpp +++ b/hecl/lib/ClientProcess.cpp @@ -68,7 +68,7 @@ void ClientProcess::BufferTransaction::run(blender::Token& btok) { return; } if (m_offset) - r.seek(m_offset, athena::Begin); + r.seek(m_offset, athena::SeekOrigin::Begin); r.readBytesToBuf(m_targetBuf, m_maxLen); m_complete = true; }