Use auto-syntax in places touched by previous commit consistently
This commit is contained in:
parent
9f41c30443
commit
56ccd3da80
|
@ -82,12 +82,12 @@ void MatroskaContainer::reset()
|
||||||
*/
|
*/
|
||||||
void MatroskaContainer::validateIndex(Diagnostics &diag, AbortableProgressFeedback &progress)
|
void MatroskaContainer::validateIndex(Diagnostics &diag, AbortableProgressFeedback &progress)
|
||||||
{
|
{
|
||||||
static const string context("validating Matroska file index (cues)");
|
static const auto context = std::string("validating Matroska file index (cues)");
|
||||||
bool cuesElementsFound = false;
|
auto cuesElementsFound = false;
|
||||||
if (m_firstElement) {
|
if (m_firstElement) {
|
||||||
unordered_set<EbmlElement::IdentifierType> ids;
|
auto ids = std::unordered_set<EbmlElement::IdentifierType>();
|
||||||
bool cueTimeFound = false, cueTrackPositionsFound = false;
|
auto cueTimeFound = false, cueTrackPositionsFound = false;
|
||||||
unique_ptr<EbmlElement> clusterElement;
|
auto clusterElement = std::unique_ptr<EbmlElement>();
|
||||||
auto pos = std::uint64_t(), prevClusterSize = std::uint64_t(), currentOffset = std::uint64_t();
|
auto pos = std::uint64_t(), prevClusterSize = std::uint64_t(), currentOffset = std::uint64_t();
|
||||||
// iterate through all segments
|
// iterate through all segments
|
||||||
for (EbmlElement *segmentElement = m_firstElement->siblingById(MatroskaIds::Segment, diag); segmentElement;
|
for (EbmlElement *segmentElement = m_firstElement->siblingById(MatroskaIds::Segment, diag); segmentElement;
|
||||||
|
|
|
@ -1702,9 +1702,9 @@ void MediaFileInfo::makeMp3File(Diagnostics &diag, AbortableProgressFeedback &pr
|
||||||
progress.updateStep(flacStream ? "Updating FLAC tags ..." : "Updating ID3v2 tags ...");
|
progress.updateStep(flacStream ? "Updating FLAC tags ..." : "Updating ID3v2 tags ...");
|
||||||
|
|
||||||
// prepare ID3v2 tags
|
// prepare ID3v2 tags
|
||||||
vector<Id3v2TagMaker> makers;
|
auto makers = std::vector<Id3v2TagMaker>();
|
||||||
makers.reserve(m_id3v2Tags.size());
|
makers.reserve(m_id3v2Tags.size());
|
||||||
std::uint64_t tagsSize = 0;
|
auto tagsSize = std::uint64_t();
|
||||||
for (auto &tag : m_id3v2Tags) {
|
for (auto &tag : m_id3v2Tags) {
|
||||||
try {
|
try {
|
||||||
makers.emplace_back(tag->prepareMaking(diag));
|
makers.emplace_back(tag->prepareMaking(diag));
|
||||||
|
@ -1714,9 +1714,9 @@ void MediaFileInfo::makeMp3File(Diagnostics &diag, AbortableProgressFeedback &pr
|
||||||
}
|
}
|
||||||
|
|
||||||
// determine stream offset and make track/format specific metadata
|
// determine stream offset and make track/format specific metadata
|
||||||
std::uint32_t streamOffset; // where the actual stream starts
|
auto streamOffset = std::uint32_t(); // where the actual stream starts
|
||||||
stringstream flacMetaData(ios_base::in | ios_base::out | ios_base::binary);
|
auto flacMetaData = std::stringstream(std::ios_base::in | std::ios_base::out | std::ios_base::binary);
|
||||||
flacMetaData.exceptions(ios_base::badbit | ios_base::failbit);
|
flacMetaData.exceptions(std::ios_base::badbit | std::ios_base::failbit);
|
||||||
auto startOfLastMetaDataBlock = std::streamoff();
|
auto startOfLastMetaDataBlock = std::streamoff();
|
||||||
if (flacStream) {
|
if (flacStream) {
|
||||||
// if it is a raw FLAC stream, make FLAC metadata
|
// if it is a raw FLAC stream, make FLAC metadata
|
||||||
|
@ -1729,8 +1729,8 @@ void MediaFileInfo::makeMp3File(Diagnostics &diag, AbortableProgressFeedback &pr
|
||||||
}
|
}
|
||||||
|
|
||||||
// check whether rewrite is required
|
// check whether rewrite is required
|
||||||
bool rewriteRequired = isForcingRewrite() || !m_saveFilePath.empty() || (tagsSize > streamOffset);
|
auto rewriteRequired = isForcingRewrite() || !m_saveFilePath.empty() || (tagsSize > streamOffset);
|
||||||
size_t padding = 0;
|
auto padding = std::size_t();
|
||||||
if (!rewriteRequired) {
|
if (!rewriteRequired) {
|
||||||
// rewriting is not forced and new tag is not too big for available space
|
// rewriting is not forced and new tag is not too big for available space
|
||||||
// -> calculate new padding
|
// -> calculate new padding
|
||||||
|
|
|
@ -435,11 +435,11 @@ void OggContainer::internalMakeFile(Diagnostics &diag, AbortableProgressFeedback
|
||||||
}
|
}
|
||||||
|
|
||||||
// define misc variables
|
// define misc variables
|
||||||
CopyHelper<65307> copyHelper;
|
|
||||||
vector<std::uint64_t> updatedPageOffsets;
|
|
||||||
const OggPage *lastPage = nullptr;
|
const OggPage *lastPage = nullptr;
|
||||||
|
auto copyHelper = CopyHelper<65307>();
|
||||||
|
auto updatedPageOffsets = std::vector<std::uint64_t>();
|
||||||
auto nextPageOffset = std::uint64_t();
|
auto nextPageOffset = std::uint64_t();
|
||||||
unordered_map<std::uint32_t, std::uint32_t> pageSequenceNumberBySerialNo;
|
auto pageSequenceNumberBySerialNo = std::unordered_map<std::uint32_t, std::uint32_t>();
|
||||||
|
|
||||||
// iterate through all pages of the original file
|
// iterate through all pages of the original file
|
||||||
auto updateTick = 0u;
|
auto updateTick = 0u;
|
||||||
|
|
Loading…
Reference in New Issue