58 lines
2.6 KiB
Diff
58 lines
2.6 KiB
Diff
|
|
From 0a50504c58d61a260a36e5bd63e3afe42a7a6a91 Mon Sep 17 00:00:00 2001
|
||
|
|
From: yefeng <yefeng24@huawei.com>
|
||
|
|
Date: Mon, 15 Nov 2021 18:55:21 +0800
|
||
|
|
Subject: [PATCH 1/3] typo fixes in comments
|
||
|
|
|
||
|
|
---
|
||
|
|
include/flatbuffers/flatbuffers.h | 6 +++---
|
||
|
|
include/flatbuffers/flexbuffers.h | 2 +-
|
||
|
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h
|
||
|
|
index ee34d54..e652e40 100644
|
||
|
|
--- a/include/flatbuffers/flatbuffers.h
|
||
|
|
+++ b/include/flatbuffers/flatbuffers.h
|
||
|
|
@@ -536,7 +536,7 @@ template<typename T, uint16_t length> class Array {
|
||
|
|
|
||
|
|
void CopyFromSpanImpl(flatbuffers::integral_constant<bool, true>,
|
||
|
|
flatbuffers::span<const T, length> src) {
|
||
|
|
- // Use std::memcpy() instead of std::copy() to avoid preformance degradation
|
||
|
|
+ // Use std::memcpy() instead of std::copy() to avoid performance degradation
|
||
|
|
// due to aliasing if T is char or unsigned char.
|
||
|
|
// The size is known at compile time, so memcpy would be inlined.
|
||
|
|
std::memcpy(data(), src.data(), length * sizeof(T));
|
||
|
|
@@ -2204,7 +2204,7 @@ class FlatBufferBuilder {
|
||
|
|
return reinterpret_cast<T *>(buf_.make_space(vector_size * sizeof(T)));
|
||
|
|
}
|
||
|
|
|
||
|
|
- // End the vector of structues in the flatbuffers.
|
||
|
|
+ // End the vector of structures in the flatbuffers.
|
||
|
|
// Vector should have previously be started with StartVectorOfStructs().
|
||
|
|
template<typename T>
|
||
|
|
Offset<Vector<const T *>> EndVectorOfStructs(size_t vector_size) {
|
||
|
|
@@ -2821,7 +2821,7 @@ inline int LookupEnum(const char **names, const char *name) {
|
||
|
|
|
||
|
|
// Minimal reflection via code generation.
|
||
|
|
// Besides full-fat reflection (see reflection.h) and parsing/printing by
|
||
|
|
-// loading schemas (see idl.h), we can also have code generation for mimimal
|
||
|
|
+// loading schemas (see idl.h), we can also have code generation for minimal
|
||
|
|
// reflection data which allows pretty-printing and other uses without needing
|
||
|
|
// a schema or a parser.
|
||
|
|
// Generate code with --reflect-types (types only) or --reflect-names (names
|
||
|
|
diff --git a/include/flatbuffers/flexbuffers.h b/include/flatbuffers/flexbuffers.h
|
||
|
|
index c71928e..3e7ab3e 100644
|
||
|
|
--- a/include/flatbuffers/flexbuffers.h
|
||
|
|
+++ b/include/flatbuffers/flexbuffers.h
|
||
|
|
@@ -1086,7 +1086,7 @@ class Builder FLATBUFFERS_FINAL_CLASS {
|
||
|
|
return stack_.size();
|
||
|
|
}
|
||
|
|
|
||
|
|
- // TODO(wvo): allow this to specify an aligment greater than the natural
|
||
|
|
+ // TODO(wvo): allow this to specify an alignment greater than the natural
|
||
|
|
// alignment.
|
||
|
|
size_t EndVector(size_t start, bool typed, bool fixed) {
|
||
|
|
auto vec = CreateVector(start, stack_.size() - start, 1, typed, fixed);
|
||
|
|
--
|
||
|
|
2.17.1
|
||
|
|
|