summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-10-28 18:02:46 +0100
committerWouter van Oortmerssen <aardappel@gmail.com>2019-10-28 10:02:46 -0700
commit1b85292fd31f7b413aa3a15c466b6bd98ec3db13 (patch)
tree286d5172ccabfeba5f07b14fccf21b2ae13761b7
parent480815447af30b52b36a7a81c37a41d0d30aac54 (diff)
downloadflatbuffers-1b85292fd31f7b413aa3a15c466b6bd98ec3db13.tar.gz
flatbuffers-1b85292fd31f7b413aa3a15c466b6bd98ec3db13.tar.bz2
flatbuffers-1b85292fd31f7b413aa3a15c466b6bd98ec3db13.zip
Fix typos in comments (#5590)
Found by the https://github.com/OSGeo/gdal/blob/master/gdal/scripts/fix_typos.sh script on the internal copy of flatbuffers inside GDAL
-rw-r--r--include/flatbuffers/base.h2
-rw-r--r--include/flatbuffers/flatbuffers.h2
-rw-r--r--include/flatbuffers/flexbuffers.h2
-rw-r--r--include/flatbuffers/grpc.h4
4 files changed, 5 insertions, 5 deletions
diff --git a/include/flatbuffers/base.h b/include/flatbuffers/base.h
index a8b14073..9c4ae11d 100644
--- a/include/flatbuffers/base.h
+++ b/include/flatbuffers/base.h
@@ -99,7 +99,7 @@
#if !defined(__clang__) && \
defined(__GNUC__) && \
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ < 40600)
- // Backwards compatability for g++ 4.4, and 4.5 which don't have the nullptr
+ // Backwards compatibility for g++ 4.4, and 4.5 which don't have the nullptr
// and constexpr keywords. Note the __clang__ check is needed, because clang
// presents itself as an older GNUC compiler.
#ifndef nullptr_t
diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h
index a4acdf96..fcf1f27a 100644
--- a/include/flatbuffers/flatbuffers.h
+++ b/include/flatbuffers/flatbuffers.h
@@ -2235,7 +2235,7 @@ class Verifier FLATBUFFERS_FINAL_CLASS {
// Check the vtable offset.
auto tableo = static_cast<size_t>(table - buf_);
if (!Verify<soffset_t>(tableo)) return false;
- // This offset may be signed, but doing the substraction unsigned always
+ // This offset may be signed, but doing the subtraction unsigned always
// gives the result we want.
auto vtableo = tableo - static_cast<size_t>(ReadScalar<soffset_t>(table));
// Check the vtable size field, then check vtable fits in its entirety.
diff --git a/include/flatbuffers/flexbuffers.h b/include/flatbuffers/flexbuffers.h
index e1183b67..583c90bb 100644
--- a/include/flatbuffers/flexbuffers.h
+++ b/include/flatbuffers/flexbuffers.h
@@ -1054,7 +1054,7 @@ class Builder FLATBUFFERS_FINAL_CLASS {
for (auto key = start; key < stack_.size(); key += 2) {
FLATBUFFERS_ASSERT(stack_[key].type_ == FBT_KEY);
}
- // Now sort values, so later we can do a binary seach lookup.
+ // Now sort values, so later we can do a binary search lookup.
// We want to sort 2 array elements at a time.
struct TwoValue {
Value key;
diff --git a/include/flatbuffers/grpc.h b/include/flatbuffers/grpc.h
index a75b67c7..7070aba6 100644
--- a/include/flatbuffers/grpc.h
+++ b/include/flatbuffers/grpc.h
@@ -274,7 +274,7 @@ template<class T> class SerializationTraits<flatbuffers::grpc::Message<T>> {
grpc_byte_buffer **buffer, bool *own_buffer) {
// We are passed in a `Message<T>`, which is a wrapper around a
// `grpc_slice`. We extract it here using `BorrowSlice()`. The const cast
- // is necesary because the `grpc_raw_byte_buffer_create` func expects
+ // is necessary because the `grpc_raw_byte_buffer_create` func expects
// non-const slices in order to increment their refcounts.
grpc_slice *slice = const_cast<grpc_slice *>(&msg.BorrowSlice());
// Now use `grpc_raw_byte_buffer_create` to package the single slice into a
@@ -306,7 +306,7 @@ template<class T> class SerializationTraits<flatbuffers::grpc::Message<T>> {
grpc_byte_buffer_reader_init(&reader, buffer);
grpc_slice slice = grpc_byte_buffer_reader_readall(&reader);
grpc_byte_buffer_reader_destroy(&reader);
- // We wrap a `Message<T>` around the slice, but dont increment refcount
+ // We wrap a `Message<T>` around the slice, but don't increment refcount
*msg = flatbuffers::grpc::Message<T>(slice, false);
}
grpc_byte_buffer_destroy(buffer);