From c3394acdb2d2885d958aac65b0babee0a222e819 Mon Sep 17 00:00:00 2001 From: Martchus Date: Wed, 1 Mar 2017 18:21:00 +0100 Subject: [PATCH] Fix typos --- CMakeLists.txt | 2 +- abstractattachment.cpp | 2 +- abstractcontainer.cpp | 8 ++++---- backuphelper.cpp | 2 +- fieldbasedtag.h | 4 ++-- flac/flacstream.cpp | 2 +- id3/id3v2frame.cpp | 2 +- matroska/matroskacontainer.cpp | 4 ++-- matroska/matroskaseekinfo.cpp | 2 +- mediafileinfo.cpp | 2 +- mp4/mp4atom.cpp | 6 +++--- mp4/mp4container.cpp | 2 +- mp4/mp4ids.h | 2 +- mp4/mp4track.cpp | 2 +- mp4/mpeg4descriptor.cpp | 2 +- notification.h | 2 +- ogg/oggstream.cpp | 10 +++++----- tag.cpp | 2 +- 18 files changed, 29 insertions(+), 29 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 702b23a..c618da8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,7 +160,7 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}") set(META_APP_DESCRIPTION "C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags") set(META_VERSION_MAJOR 6) set(META_VERSION_MINOR 2) -set(META_VERSION_PATCH 1) +set(META_VERSION_PATCH 2) set(META_PUBLIC_SHARED_LIB_DEPENDS c++utilities) set(META_PUBLIC_STATIC_LIB_DEPENDS c++utilities_static) set(META_PRIVATE_COMPILE_DEFINITIONS LEGACY_API) diff --git a/abstractattachment.cpp b/abstractattachment.cpp index 020fab0..0cbfa83 100644 --- a/abstractattachment.cpp +++ b/abstractattachment.cpp @@ -51,7 +51,7 @@ StreamDataBlock::StreamDataBlock(const std::function &stream, m_endOffset = s.tellg(); s.seekg(currentPos); if(m_endOffset < m_startOffset) { - IoUtilities::throwIoFailure("End offset is less then start offset."); + IoUtilities::throwIoFailure("End offset is less than start offset."); } } diff --git a/abstractcontainer.cpp b/abstractcontainer.cpp index 38a8cfe..ffe1df9 100644 --- a/abstractcontainer.cpp +++ b/abstractcontainer.cpp @@ -280,7 +280,7 @@ Tag *AbstractContainer::createTag(const TagTarget &) /*! * \brief Returns the tag with the specified \a index. * - * \a index must be less then tagCount(). + * \a index must be less than tagCount(). */ Tag *AbstractContainer::tag(size_t ) { @@ -344,7 +344,7 @@ ElementPosition AbstractContainer::determineTagPosition() const /*! * \brief Returns the track with the specified \a index. * - * \a index must be less then trackCount(). + * \a index must be less than trackCount(). */ AbstractTrack *AbstractContainer::track(size_t ) { @@ -397,7 +397,7 @@ void AbstractContainer::removeAllTracks() /*! * \brief Returns the chapter with the specified \a index. * - * \a index must be less then chapterCount(). + * \a index must be less than chapterCount(). */ AbstractChapter *AbstractContainer::chapter(size_t ) { @@ -425,7 +425,7 @@ AbstractAttachment *AbstractContainer::createAttachment() /*! * \brief Returns the attachment with the specified \a index. * - * \a index must be less then attachmentCount(). + * \a index must be less than attachmentCount(). */ AbstractAttachment *AbstractContainer::attachment(size_t ) { diff --git a/backuphelper.cpp b/backuphelper.cpp index 16122f6..5ff8519 100644 --- a/backuphelper.cpp +++ b/backuphelper.cpp @@ -105,7 +105,7 @@ void restoreOriginalFileFromBackupFile(const std::string &originalPath, const st * * This helper function is used by MediaFileInfo and container implementations to create a backup file * when applying changes. The path of the created backup file is set to \a backup path. - * The specified \a backupStream will be closed if currently open. Then is is + * The specified \a backupStream will be closed if currently open. Then it is * used to open the backup file using the flags ios_base::in and ios_base::binary. * * The specified \a originalStream is closed before performing the move operation. diff --git a/fieldbasedtag.h b/fieldbasedtag.h index d310492..ef97091 100644 --- a/fieldbasedtag.h +++ b/fieldbasedtag.h @@ -142,7 +142,7 @@ bool FieldMapBasedTag::setValue(const typename FieldType::id /*! * \brief Assigns the given \a values to the field with the specified \a id. - * \remarks There might me more then one value assigned to an \a id. Whereas setValue() only alters the first value, this + * \remarks There might me more than one value assigned to an \a id. Whereas setValue() only alters the first value, this * method will replace all currently assigned values with the specified \a values. * \sa Tag::setValues() */ @@ -168,7 +168,7 @@ bool FieldMapBasedTag::setValues(const typename FieldType::i /*! * \brief Assigns the given \a values to the field with the specified \a id. - * \remarks There might me more then one value assigned to a \a field. Whereas setValue() only alters the first value, this + * \remarks There might me more than one value assigned to a \a field. Whereas setValue() only alters the first value, this * method will replace all currently assigned values with the specified \a values. * \sa Tag::setValues() */ diff --git a/flac/flacstream.cpp b/flac/flacstream.cpp index ccb00da..4d3409e 100644 --- a/flac/flacstream.cpp +++ b/flac/flacstream.cpp @@ -107,7 +107,7 @@ void FlacStream::internalParseHeader() case FlacMetaDataBlockType::VorbisComment: // parse Vorbis comment - // if more then one comment exist, simply thread those comments as one + // if more than one comment exist, simply thread those comments as one if(!m_vorbisComment) { m_vorbisComment = make_unique(); } diff --git a/id3/id3v2frame.cpp b/id3/id3v2frame.cpp index da59a4c..659a8df 100644 --- a/id3/id3v2frame.cpp +++ b/id3/id3v2frame.cpp @@ -191,7 +191,7 @@ void Id3v2Frame::parse(BinaryReader &reader, const uint32 version, const uint32 if(isCompressed()) { uLongf decompressedSize = version >= 4 ? reader.readSynchsafeUInt32BE() : reader.readUInt32BE(); if(decompressedSize < m_dataSize) { - addNotification(NotificationType::Critical, "The decompressed size is smaller then the compressed size.", context); + addNotification(NotificationType::Critical, "The decompressed size is smaller than the compressed size.", context); throw InvalidDataException(); } auto bufferCompressed = make_unique(m_dataSize);; diff --git a/matroska/matroskacontainer.cpp b/matroska/matroskacontainer.cpp index c85d557..a9d5d88 100644 --- a/matroska/matroskacontainer.cpp +++ b/matroska/matroskacontainer.cpp @@ -411,7 +411,7 @@ void MatroskaContainer::internalParseHeader() case EbmlIds::MaxIdLength: m_maxIdLength = subElement->readUInteger(); if(m_maxIdLength > EbmlElement::maximumIdLengthSupported()) { - addNotification(NotificationType::Critical, "Maximum EBML element ID length greather then " + addNotification(NotificationType::Critical, "Maximum EBML element ID length greather than " % numberToString(EbmlElement::maximumIdLengthSupported()) + " bytes is not supported.", context); throw InvalidDataException(); @@ -420,7 +420,7 @@ void MatroskaContainer::internalParseHeader() case EbmlIds::MaxSizeLength: m_maxSizeLength = subElement->readUInteger(); if(m_maxSizeLength > EbmlElement::maximumSizeLengthSupported()) { - addNotification(NotificationType::Critical, "Maximum EBML element size length greather then " + addNotification(NotificationType::Critical, "Maximum EBML element size length greather than " % numberToString(EbmlElement::maximumSizeLengthSupported()) + " bytes is not supported.", context); throw InvalidDataException(); diff --git a/matroska/matroskaseekinfo.cpp b/matroska/matroskaseekinfo.cpp index cbba2bd..0810fee 100644 --- a/matroska/matroskaseekinfo.cpp +++ b/matroska/matroskaseekinfo.cpp @@ -19,7 +19,7 @@ namespace Media { */ /*! - * \brief Shifts all offsets greather or equal then \a start by \a amount bytes. + * \brief Shifts all offsets greather or equal than \a start by \a amount bytes. */ void MatroskaSeekInfo::shift(uint64 start, int64 amount) { diff --git a/mediafileinfo.cpp b/mediafileinfo.cpp index 5affed8..2e4ffaf 100644 --- a/mediafileinfo.cpp +++ b/mediafileinfo.cpp @@ -193,7 +193,7 @@ startParsingSignature: // save position of ID3v2 tag m_actualId3v2TagOffsets.push_back(m_containerOffset); if(m_actualId3v2TagOffsets.size() == 2) { - addNotification(NotificationType::Warning, "There is more then just one ID3v2 header at the beginning of the file.", context); + addNotification(NotificationType::Warning, "There is more than just one ID3v2 header at the beginning of the file.", context); } // read ID3v2 header diff --git a/mp4/mp4atom.cpp b/mp4/mp4atom.cpp index 71a3b41..f96d4ec 100644 --- a/mp4/mp4atom.cpp +++ b/mp4/mp4atom.cpp @@ -60,7 +60,7 @@ void Mp4Atom::internalParse() invalidateStatus(); static const string context("parsing MP4 atom"); if(maxTotalSize() < minimumElementSize()) { - addNotification(NotificationType::Critical, "Atom is smaller then 8 byte and hence invalid. The remaining size within the parent atom is " % numberToString(maxTotalSize()) + ".", context); + addNotification(NotificationType::Critical, "Atom is smaller than 8 byte and hence invalid. The remaining size within the parent atom is " % numberToString(maxTotalSize()) + ".", context); throw TruncatedDataException(); } stream().seekg(startOffset()); @@ -74,7 +74,7 @@ void Mp4Atom::internalParse() throw NoDataFoundException(); } if(m_dataSize < 8 && m_dataSize != 1) { - addNotification(NotificationType::Critical, "Atom is smaller then 8 byte and hence invalid.", context); + addNotification(NotificationType::Critical, "Atom is smaller than 8 byte and hence invalid.", context); throw TruncatedDataException(); } m_id = reader().readUInt32BE(); @@ -83,7 +83,7 @@ void Mp4Atom::internalParse() m_dataSize = reader().readUInt64BE(); m_sizeLength = 12; // 4 bytes indicate long size denotation + 8 bytes for actual size denotation if(dataSize() < 16 && m_dataSize != 1) { - addNotification(NotificationType::Critical, "Atom denoting 64-bit size is smaller then 16 byte and hence invalid.", parsingContext()); + addNotification(NotificationType::Critical, "Atom denoting 64-bit size is smaller than 16 byte and hence invalid.", parsingContext()); throw TruncatedDataException(); } } else { diff --git a/mp4/mp4container.cpp b/mp4/mp4container.cpp index bacda04..77fcaa1 100644 --- a/mp4/mp4container.cpp +++ b/mp4/mp4container.cpp @@ -484,7 +484,7 @@ calculatePadding: // -> check whether the padding matches specifications // min padding: says "at least ... byte should be reserved to prepend further tag info", so the padding at the end // shouldn't be tanken into account (it can't be used to prepend further tag info) - // max padding: says "do not waste more then ... byte", so here all padding should be taken into account + // max padding: says "do not waste more than ... byte", so here all padding should be taken into account newPadding = firstMediaDataAtom->startOffset() - currentOffset; rewriteRequired = (newPadding > 0 && newPadding < 8) || newPadding < fileInfo().minPadding() || (newPadding + newPaddingEnd) > fileInfo().maxPadding(); } diff --git a/mp4/mp4ids.h b/mp4/mp4ids.h index b04aacb..df49da6 100644 --- a/mp4/mp4ids.h +++ b/mp4/mp4ids.h @@ -319,7 +319,7 @@ enum KnownValue : uint32 { Mpeg4Decoder1 = 0x464D5034, Mpeg4Decoder2 = 0x53454447, Mpeg4Decoder3 = 0x57563146, - Mpeg4Sample = 0x6d703473, /**< MPEG-4 stream (other then video/audio) */ + Mpeg4Sample = 0x6d703473, /**< MPEG-4 stream (other than video/audio) */ Mpeg4TimedText = 0x74783367, /**< MPEG-4 Timed Text / Streaming text format / Part 17 */ Mpeg4Video = 0x6d703476, /**< MPEG-4 video */ MsMpeg4V1Decoder1 = 0x44495631, diff --git a/mp4/mp4track.cpp b/mp4/mp4track.cpp index 759b399..e9b5a1a 100644 --- a/mp4/mp4track.cpp +++ b/mp4/mp4track.cpp @@ -435,7 +435,7 @@ vector Mp4Track::readChunkSizes() addChunkSizeEntries(chunkSizes, firstChunkIndex - previousChunkIndex, sampleIndex, samplesPerChunk); } else { addNotification(NotificationType::Critical, - "The first chunk index of a \"sample to chunk\" entry must be greather then the first chunk of the previous entry and not greather then the chunk count.", context); + "The first chunk index of a \"sample to chunk\" entry must be greather than the first chunk of the previous entry and not greather than the chunk count.", context); throw InvalidDataException(); } previousChunkIndex = firstChunkIndex; diff --git a/mp4/mpeg4descriptor.cpp b/mp4/mpeg4descriptor.cpp index 06bae9c..ee4e16d 100644 --- a/mp4/mpeg4descriptor.cpp +++ b/mp4/mpeg4descriptor.cpp @@ -55,7 +55,7 @@ void Mpeg4Descriptor::internalParse() { invalidateStatus(); if(maxTotalSize() < minimumElementSize()) { - addNotification(NotificationType::Critical, "Descriptor is smaller then 2 byte and hence invalid. The maximum size within the encloding element is " % numberToString(maxTotalSize()) + '.', "parsing MPEG-4 descriptor"); + addNotification(NotificationType::Critical, "Descriptor is smaller than 2 byte and hence invalid. The maximum size within the encloding element is " % numberToString(maxTotalSize()) + '.', "parsing MPEG-4 descriptor"); throw TruncatedDataException(); } stream().seekg(startOffset()); diff --git a/notification.h b/notification.h index 3f21c53..ad28e73 100644 --- a/notification.h +++ b/notification.h @@ -26,7 +26,7 @@ enum class NotificationType /*! - * \brief Sets \a lhs to \a rhs if \a rhs is worse then \a lhs and returns \a lhs. + * \brief Sets \a lhs to \a rhs if \a rhs is worse than \a lhs and returns \a lhs. */ inline NotificationType& operator |=(NotificationType &lhs, const NotificationType &rhs) { diff --git a/ogg/oggstream.cpp b/ogg/oggstream.cpp index 2178649..52547f8 100644 --- a/ogg/oggstream.cpp +++ b/ogg/oggstream.cpp @@ -117,7 +117,7 @@ void OggStream::internalParseHeader() } hasIdentificationHeader = true; } else { - addNotification(NotificationType::Critical, "Vorbis identification header appears more then once. Oversupplied occurrence will be ignored.", context); + addNotification(NotificationType::Critical, "Vorbis identification header appears more than once. Oversupplied occurrence will be ignored.", context); } break; case VorbisPackageTypes::Comments: @@ -126,7 +126,7 @@ void OggStream::internalParseHeader() m_container.announceComment(iterator.currentPageIndex(), iterator.currentSegmentIndex(), false, GeneralMediaFormat::Vorbis); hasCommentHeader = true; } else { - addNotification(NotificationType::Critical, "Vorbis comment header appears more then once. Oversupplied occurrence will be ignored.", context); + addNotification(NotificationType::Critical, "Vorbis comment header appears more than once. Oversupplied occurrence will be ignored.", context); } break; case VorbisPackageTypes::Setup: @@ -174,7 +174,7 @@ void OggStream::internalParseHeader() } hasIdentificationHeader = true; } else { - addNotification(NotificationType::Critical, "Opus identification header appears more then once. Oversupplied occurrence will be ignored.", context); + addNotification(NotificationType::Critical, "Opus identification header appears more than once. Oversupplied occurrence will be ignored.", context); } } else if(sig == 0x4F70757354616773u) { @@ -197,7 +197,7 @@ void OggStream::internalParseHeader() m_container.announceComment(iterator.currentPageIndex(), iterator.currentSegmentIndex(), false, GeneralMediaFormat::Opus); hasCommentHeader = true; } else { - addNotification(NotificationType::Critical, "Opus tags/comment header appears more then once. Oversupplied occurrence will be ignored.", context); + addNotification(NotificationType::Critical, "Opus tags/comment header appears more than once. Oversupplied occurrence will be ignored.", context); } } else if((sig & 0xFFFFFFFFFF000000u) == 0x7F464C4143000000u) { @@ -235,7 +235,7 @@ void OggStream::internalParseHeader() m_duration = TimeSpan::fromSeconds(static_cast(m_sampleCount) / m_samplingFrequency); hasIdentificationHeader = true; } else { - addNotification(NotificationType::Critical, "FLAC-to-Ogg mapping header appears more then once. Oversupplied occurrence will be ignored.", context); + addNotification(NotificationType::Critical, "FLAC-to-Ogg mapping header appears more than once. Oversupplied occurrence will be ignored.", context); } if(!hasCommentHeader) { diff --git a/tag.cpp b/tag.cpp index c9f6b59..81d5e6e 100644 --- a/tag.cpp +++ b/tag.cpp @@ -63,7 +63,7 @@ std::vector Tag::values(KnownField field) const /*! * \brief Assigns the given \a values to the specified \a field. * \remarks - * - There might me more then one value assigned to a \a field. Whereas setValue() only alters the first value, this + * - There might me more than one value assigned to a \a field. Whereas setValue() only alters the first value, this * method will replace all currently assigned values with the specified \a values. * - However, the default implementation just sets the first value and discards additional values assuming * multiple values per field are not supported by the tag.