diff --git a/ogg/oggcontainer.cpp b/ogg/oggcontainer.cpp index 0353a80..ff259f3 100644 --- a/ogg/oggcontainer.cpp +++ b/ogg/oggcontainer.cpp @@ -521,11 +521,11 @@ void OggContainer::internalMakeFile(Diagnostics &diag, AbortableProgressFeedback && m_iterator.currentPageIndex() <= currentParams->lastPageIndex && !currentPage.segmentSizes().empty()) { // page needs to be rewritten (not just copied) // -> write segments to a buffer first - stringstream buffer(ios_base::in | ios_base::out | ios_base::binary); - vector newSegmentSizes; + auto buffer = std::stringstream(std::ios_base::in | std::ios_base::out | std::ios_base::binary); + auto newSegmentSizes = std::vector(); newSegmentSizes.reserve(currentPage.segmentSizes().size()); - std::uint64_t segmentOffset = m_iterator.currentSegmentOffset(); - vector::size_type segmentIndex = 0; + auto segmentOffset = m_iterator.currentSegmentOffset(); + auto segmentIndex = std::vector::size_type(); for (const auto segmentSize : currentPage.segmentSizes()) { if (!segmentSize) { ++segmentIndex; @@ -554,7 +554,7 @@ void OggContainer::internalMakeFile(Diagnostics &diag, AbortableProgressFeedback } } else { // copy other segments unchanged - backupStream.seekg(static_cast(segmentOffset)); + backupStream.seekg(static_cast(segmentOffset)); copyHelper.copy(backupStream, buffer, segmentSize); newSegmentSizes.push_back(segmentSize);