From a2ff0f418f27060262bf5eeaaa695d6b4c25a0ff Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 23 Jul 2018 14:44:06 +0200 Subject: [PATCH] Fix typo occured -> occurred --- backuphelper.cpp | 6 +++--- matroska/ebmlelement.cpp | 4 ++-- matroska/matroskacontainer.cpp | 4 ++-- mediafileinfo.h | 4 ++-- mp4/mp4container.cpp | 2 +- ogg/oggiterator.cpp | 2 +- scripts/download_testfiles.sh | 3 ++- tests/utils.cpp | 2 +- vorbis/vorbiscommentfield.cpp | 4 ++-- 9 files changed, 16 insertions(+), 15 deletions(-) diff --git a/backuphelper.cpp b/backuphelper.cpp index feac001..9ec7588 100644 --- a/backuphelper.cpp +++ b/backuphelper.cpp @@ -218,7 +218,7 @@ void createBackupFile(const std::string &backupDir, const std::string &originalP } /*! - * \brief Handles a failure/abort which occured after the file has been modified. + * \brief Handles a failure/abort which occurred after the file has been modified. * * - Restores the backup file using restoreOriginalFileFromBackupFile() if one has been created. * - Adds appropriate notifications to the specified \a fileInfo. @@ -281,7 +281,7 @@ void handleFailureAfterFileModified(MediaFileInfo &fileInfo, const std::string & const char *what = catchIoFailure(); if (!backupPath.empty()) { // a temp/backup file has been created -> restore original file - diag.emplace_back(DiagLevel::Critical, "An IO error occured when rewriting the file to apply changed tag information.", context); + diag.emplace_back(DiagLevel::Critical, "An IO error occurred when rewriting the file to apply changed tag information.", context); try { restoreOriginalFileFromBackupFile(fileInfo.path(), backupPath, outputStream, backupStream); diag.emplace_back(DiagLevel::Information, "The original file has been restored.", context); @@ -289,7 +289,7 @@ void handleFailureAfterFileModified(MediaFileInfo &fileInfo, const std::string & diag.emplace_back(DiagLevel::Critical, catchIoFailure(), context); } } else { - diag.emplace_back(DiagLevel::Critical, "An IO error occured when applying tag information.", context); + diag.emplace_back(DiagLevel::Critical, "An IO error occurred when applying tag information.", context); } throwIoFailure(what); } diff --git a/matroska/ebmlelement.cpp b/matroska/ebmlelement.cpp index 6a404f2..1a4f989 100644 --- a/matroska/ebmlelement.cpp +++ b/matroska/ebmlelement.cpp @@ -208,7 +208,7 @@ void EbmlElement::internalParse(Diagnostics &diag) m_nextSibling.reset(); } - // no critical errors occured + // no critical errors occurred // -> add a warning if bytes have been skipped if (skipped) { diag.emplace_back(DiagLevel::Warning, argsToString(skipped, " bytes have been skipped"), parsingContext()); @@ -217,7 +217,7 @@ void EbmlElement::internalParse(Diagnostics &diag) return; } - // critical errors occured and skipping some bytes wasn't successful + // critical errors occurred and skipping some bytes wasn't successful throw InvalidDataException(); } diff --git a/matroska/matroskacontainer.cpp b/matroska/matroskacontainer.cpp index e532652..6c7deec 100644 --- a/matroska/matroskacontainer.cpp +++ b/matroska/matroskacontainer.cpp @@ -1478,7 +1478,7 @@ void MatroskaContainer::internalMakeFile(Diagnostics &diag, AbortableProgressFee throw; } catch (...) { const char *what = catchIoFailure(); - diag.emplace_back(DiagLevel::Critical, "An IO error occured when parsing the original file.", context); + diag.emplace_back(DiagLevel::Critical, "An IO error occurred when parsing the original file.", context); throwIoFailure(what); } @@ -1856,7 +1856,7 @@ void MatroskaContainer::internalMakeFile(Diagnostics &diag, AbortableProgressFee // flush output stream outputStream.flush(); - // handle errors (which might have been occured after renaming/creating backup file) + // handle errors (which might have been occurred after renaming/creating backup file) } catch (...) { BackupHelper::handleFailureAfterFileModified(fileInfo(), backupPath, outputStream, backupStream, diag, context); } diff --git a/mediafileinfo.h b/mediafileinfo.h index b2f8c31..96e2505 100644 --- a/mediafileinfo.h +++ b/mediafileinfo.h @@ -36,9 +36,9 @@ DECLARE_ENUM_CLASS(TagType, unsigned int); */ enum class ParsingStatus : byte { NotParsedYet, /**< the part has not been parsed yet */ - Ok, /**< the part has been parsed and no critical errors occured */ + Ok, /**< the part has been parsed and no critical errors occurred */ NotSupported, /**< tried to parse the part, but the format is not supported */ - CriticalFailure /**< tried to parse the part, but critical errors occured */ + CriticalFailure /**< tried to parse the part, but critical errors occurred */ }; class TAG_PARSER_EXPORT MediaFileInfo : public BasicFileInfo { diff --git a/mp4/mp4container.cpp b/mp4/mp4container.cpp index b5d968d..2e56fcd 100644 --- a/mp4/mp4container.cpp +++ b/mp4/mp4container.cpp @@ -859,7 +859,7 @@ calculatePadding: // flush output stream outputStream.flush(); - // handle errors (which might have been occured after renaming/creating backup file) + // handle errors (which might have been occurred after renaming/creating backup file) } catch (...) { BackupHelper::handleFailureAfterFileModified(fileInfo(), backupPath, outputStream, backupStream, diag, context); } diff --git a/ogg/oggiterator.cpp b/ogg/oggiterator.cpp index c9354c4..ca8b7a9 100644 --- a/ogg/oggiterator.cpp +++ b/ogg/oggiterator.cpp @@ -218,7 +218,7 @@ void OggIterator::ignore(size_t count) * This allows to omit parts of a file which is useful to * - find the last page faster by skipping pages in the middle (last page is required for calculating * the files duration). - * - recover parsing after after an error occured. + * - recover parsing after after an error occurred. * * Regardless of the current iterator position, this method will assume the page at \a offset comes after * the last known page. Hence \a offset must be greather than OggPage::startOffset() + OggPage::totalSize() of the diff --git a/scripts/download_testfiles.sh b/scripts/download_testfiles.sh index fab0a51..e64a3e1 100755 --- a/scripts/download_testfiles.sh +++ b/scripts/download_testfiles.sh @@ -124,6 +124,7 @@ inform "Creating further testfiles with mkvmerge" --default-track '1:yes' \ \( 'mtx-test-data/mkv/tags.mkv' \) \ --global-tags "$srcdir/testfiles/mkv/nested-tags.xml" \ - --track-order '0:0,0:1' + --track-order '0:0,0:1' \ + || inform "Skipping already existing mkv/nested-tags.mkv" success "All testfiles downloaded/converted!" diff --git a/tests/utils.cpp b/tests/utils.cpp index 777bfb5..7da63fd 100644 --- a/tests/utils.cpp +++ b/tests/utils.cpp @@ -396,7 +396,7 @@ void UtilitiesTests::testBackupFile() catchIoFailure(); } CPPUNIT_ASSERT(diag.level() >= DiagLevel::Critical); - CPPUNIT_ASSERT_EQUAL("An IO error occured when rewriting the file to apply changed tag information."s, diag.front().message()); + CPPUNIT_ASSERT_EQUAL("An IO error occurred when rewriting the file to apply changed tag information."s, diag.front().message()); CPPUNIT_ASSERT_EQUAL("The original file has been restored."s, diag.back().message()); } diff --git a/vorbis/vorbiscommentfield.cpp b/vorbis/vorbiscommentfield.cpp index 00dccc2..f61b839 100644 --- a/vorbis/vorbiscommentfield.cpp +++ b/vorbis/vorbiscommentfield.cpp @@ -92,7 +92,7 @@ template void VorbisCommentField::internalParse(StreamType &s throw InvalidDataException(); } catch (...) { catchIoFailure(); - diag.emplace_back(DiagLevel::Critical, "An IO error occured when reading the METADATA_BLOCK_PICTURE struct.", context); + diag.emplace_back(DiagLevel::Critical, "An IO error occurred when reading the METADATA_BLOCK_PICTURE struct.", context); throw Failure(); } } else if (id().size() + 1 < size) { @@ -196,7 +196,7 @@ bool VorbisCommentField::make(BinaryWriter &writer, VorbisCommentFlags flags, Di throw; } catch (...) { catchIoFailure(); - diag.emplace_back(DiagLevel::Critical, "An IO error occured when writing the METADATA_BLOCK_PICTURE struct.", context); + diag.emplace_back(DiagLevel::Critical, "An IO error occurred when writing the METADATA_BLOCK_PICTURE struct.", context); throw Failure(); } } else {