Fix typos found via `codespell --skip .git -w`

This commit is contained in:
Martchus 2021-07-03 19:50:25 +02:00
parent a4dd52acfa
commit 5e72012ed5
10 changed files with 16 additions and 16 deletions

View File

@ -7,14 +7,14 @@
- [x] Add documentation (install instructions, usage)
- [x] Allow making 3rdparty classes/structs reflectable
- [x] Add additional parameter for code generator to allow specifying relevant classes
explicitely
explicitly
- [x] Fix traits currently relying on `JsonSerializable` being base class
- [x] Allow exporting symbols
- [x] Fix the massive number of warnings which are currently being created by the code generator (missing `-resource-dir` was the problem)
- [ ] Test with libc++ (currently only tested with libstdc++)
- [ ] Support templated classes
- [ ] Allow (de)serialization of static members (if that makes sense?)
- [ ] Allow ignoring particular members or selecting specificly which member variables should be considered
- [ ] Allow ignoring particular members or selecting specifically which member variables should be considered
* This could work similar to Qt's Signals & Slots macros.
* but there should also be a way to do this for 3rdparty types.
* Note that currently, *all* public member variables are (de)serialized.

View File

@ -85,7 +85,7 @@ bool CodeFactory::generate() const
}
/*!
* \brief Reads (relevent) AST elements using Clang and generates code.
* \brief Reads (relevant) AST elements using Clang and generates code.
*/
bool CodeFactory::run()
{

View File

@ -123,14 +123,14 @@ int main(int argc, char *argv[])
// read AST elements from input files and run the code generator
if (!factory.run()) {
cerr << Phrases::Error << "Errors occured." << Phrases::EndFlush;
cerr << Phrases::Error << "Errors occurred." << Phrases::EndFlush;
return -2;
}
} catch (const std::ios_base::failure &failure) {
const char *errorMessage = failure.what();
if (os) {
errorMessage = os->fail() || os->bad() ? "An IO error occured when writing to the output stream." : "An IO error occured.";
errorMessage = os->fail() || os->bad() ? "An IO error occurred when writing to the output stream." : "An IO error occurred.";
} else {
errorMessage = "An IO error when opening output stream.";
}

View File

@ -84,7 +84,7 @@ void JsonGeneratorTests::testGeneratorItself()
}
/*!
* \brief Tests the generator CLI explicitely.
* \brief Tests the generator CLI explicitly.
* \remarks Only available under UNIX (like) systems so far, because TESTUTILS_ASSERT_EXEC has not been implemented
* for other platforms.
*/
@ -164,7 +164,7 @@ void JsonGeneratorTests::testNesting()
}
/*!
* \brief Like testIncludingGeneratedHeader() but also tests single inheritence.
* \brief Like testIncludingGeneratedHeader() but also tests single inheritance.
*/
void JsonGeneratorTests::testSingleInheritence()
{
@ -193,7 +193,7 @@ void JsonGeneratorTests::testSingleInheritence()
}
/*!
* \brief Like testIncludingGeneratedHeader() but also tests multiple inheritence.
* \brief Like testIncludingGeneratedHeader() but also tests multiple inheritance.
*/
void JsonGeneratorTests::testMultipleInheritence()
{

View File

@ -128,7 +128,7 @@ REFLECTIVE_RAPIDJSON_MAKE_JSON_SERIALIZABLE(NotJsonSerializable);
REFLECTIVE_RAPIDJSON_MAKE_JSON_SERIALIZABLE(NestedNotJsonSerializable);
/*!
* \brief The OtherNotJsonSerializable struct is used to test whether code for (de)serialization is generated for classes explicitely
* \brief The OtherNotJsonSerializable struct is used to test whether code for (de)serialization is generated for classes explicitly
* specified via CMake macro (despite use of REFLECTIVE_RAPIDJSON_ADAPT_JSON_SERIALIZABLE or JsonSerializable is
* missing).
*/

View File

@ -128,12 +128,12 @@ template <typename Type, Traits::EnableIf<Traits::IsSpecializationOf<Type, std::
const auto id = (mode & 0x4) ? readUInt64BE() : readVariableLengthUIntBE(); // the 3rd bit being flagged indicates a big ID
if ((mode & 0x3) == 1) {
// first occurence: make a new pointer
// first occurrence: make a new pointer
m_pointer[id] = pointer = std::make_shared<typename Type::element_type>();
read(*pointer);
return;
}
// further occurences: copy previous pointer
// further occurrences: copy previous pointer
try {
pointer = std::any_cast<Type>(m_pointer[id]);
} catch (const std::bad_any_cast &) {

View File

@ -3,7 +3,7 @@
/*!
* \file serializable.h
* \brief Contains only the definiation of the BinarySerializable template class which makes the reflection
* \brief Contains only the definition of the BinarySerializable template class which makes the reflection
* accessible. The actual implementation is found in binaryreflector.h and generated files.
*/

View File

@ -110,7 +110,7 @@ struct JsonDeserializationError {
JsonDeserializationError(JsonDeserializationErrorKind kind, JsonType expectedType, JsonType actualType, const char *record,
const char *member = nullptr, std::size_t index = noIndex);
/// \brief Which kind of error occured.
/// \brief Which kind of error occurred.
JsonDeserializationErrorKind kind;
/// \brief The expected type (might not be relevant for all error kinds).
JsonType expectedType;
@ -123,7 +123,7 @@ struct JsonDeserializationError {
/// \brief The index in the array which was being processed when the error was ascertained.
std::size_t index;
/// \brief Indicates no array was being processed when the error occured.
/// \brief Indicates no array was being processed when the error occurred.
static constexpr std::size_t noIndex = std::numeric_limits<std::size_t>::max();
};

View File

@ -3,7 +3,7 @@
/*!
* \file serializable.h
* \brief Contains only the definiation of the JsonSerializable template class which makes the reflection
* \brief Contains only the definition of the JsonSerializable template class which makes the reflection
* accessible. The actual implementation is found in jsonreflector.h and generated files.
*/

View File

@ -237,7 +237,7 @@ void JsonReflectorTests::testSerializePrimitives()
Document::Array array(doc.GetArray());
// string
const string foo("foo"); // musn't be destroyed until JSON is actually written
const string foo("foo"); // mustn't be destroyed until JSON is actually written
JsonReflector::push<string>(foo, array, alloc);
JsonReflector::push<const char *>("bar", array, alloc);
// number