From 9b4fcdc2b3f74e4b4cd93ba96956d5faf973170a Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 3 Jul 2021 19:40:32 +0200 Subject: [PATCH] Fix typos found via `codespell --skip .git -w` --- CMakeLists.txt | 2 +- io/cryptoexception.cpp | 2 +- io/entry.cpp | 4 ++-- io/parsingexception.cpp | 2 +- io/passwordfile.cpp | 6 +++--- tests/entrytests.cpp | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c9f93ee..0e3f76a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}") set(META_APP_DESCRIPTION "C++ library to read/write passwords from/to encrypted files") set(META_VERSION_MAJOR 5) set(META_VERSION_MINOR 0) -set(META_VERSION_PATCH 5) +set(META_VERSION_PATCH 6) set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON) # add project files diff --git a/io/cryptoexception.cpp b/io/cryptoexception.cpp index 0839cea..c3e3a1f 100644 --- a/io/cryptoexception.cpp +++ b/io/cryptoexception.cpp @@ -5,7 +5,7 @@ namespace Io { * \class CryptoException * \brief The exception that is thrown when an encryption/decryption error occurs. * \remarks Must not have any inline methods/c'tors/d'tors (so the vtable is invoked in any compile unit). - * Otherwise it is not possible to throw/catch it accross library boundaries under Android. + * Otherwise it is not possible to throw/catch it across library boundaries under Android. */ /*! diff --git a/io/entry.cpp b/io/entry.cpp index d89c4f7..0920127 100644 --- a/io/entry.cpp +++ b/io/entry.cpp @@ -20,7 +20,7 @@ namespace Io { /*! * \class Entry - * \brief Instances of the Entry class form a hierarchic data strucutre used to store + * \brief Instances of the Entry class form a hierarchic data structure used to store * account information. * * Entries can be serialized and deserialized using the parse() and make() methods. @@ -320,7 +320,7 @@ void NodeEntry::replaceChild(size_t at, Entry *newChild) return; } - // detatch the old child + // detach the old child m_children[at]->m_parent = nullptr; m_children[at]->m_index = -1; diff --git a/io/parsingexception.cpp b/io/parsingexception.cpp index e16f40e..d54ec1a 100644 --- a/io/parsingexception.cpp +++ b/io/parsingexception.cpp @@ -6,7 +6,7 @@ namespace Io { * \class ParsingException * \brief The exception that is thrown when a parsing error occurs. * \remarks Must not have any inline methods/c'tors/d'tors (so the vtable is invoked in any compile unit). - * Otherwise it is not possible to throw/catch it accross library boundaries under Android. + * Otherwise it is not possible to throw/catch it across library boundaries under Android. */ /*! diff --git a/io/passwordfile.cpp b/io/passwordfile.cpp index 4db0759..58189ed 100644 --- a/io/passwordfile.cpp +++ b/io/passwordfile.cpp @@ -116,7 +116,7 @@ void PasswordFile::open(PasswordFileOpenFlags options) { close(); if (m_path.empty()) { - throw std::ios_base::failure("Unable to open file because path is emtpy."); + throw std::ios_base::failure("Unable to open file because path is empty."); } m_file.open( m_path, options & PasswordFileOpenFlags::ReadOnly ? ios_base::in | ios_base::binary : ios_base::in | ios_base::out | ios_base::binary); @@ -450,7 +450,7 @@ void PasswordFile::write(PasswordFileSaveFlags options) } m_fwriter.writeByte(flags); - // write extened header + // write extended header if (version >= 0x4U) { if (m_extendedHeader.size() > numeric_limits::max()) { throw runtime_error("Extended header exceeds maximum size."); @@ -463,7 +463,7 @@ void PasswordFile::write(PasswordFileSaveFlags options) stringstream buffstr(stringstream::in | stringstream::out | stringstream::binary); buffstr.exceptions(ios_base::failbit | ios_base::badbit); - // write encrypted extened header + // write encrypted extended header if (version >= 0x5U) { if (m_encryptedExtendedHeader.size() > numeric_limits::max()) { throw runtime_error("Encrypted extended header exceeds maximum size."); diff --git a/tests/entrytests.cpp b/tests/entrytests.cpp index 2b844fb..0bc0520 100644 --- a/tests/entrytests.cpp +++ b/tests/entrytests.cpp @@ -160,7 +160,7 @@ void EntryTests::testEntryByPath() CPPUNIT_ASSERT_EQUAL_MESSAGE("return current instance", static_cast(&root), root.entryByPath(path)); path = { "root", "foo" }; - CPPUNIT_ASSERT_MESSAGE("nullptr for non-existant path", !root.entryByPath(path)); + CPPUNIT_ASSERT_MESSAGE("nullptr for non-existent path", !root.entryByPath(path)); path = { "root", "node" }; const auto *const node = root.entryByPath(path, true, &createNode);