aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf
diff options
context:
space:
mode:
authorGravatar Otto Kekäläinen <otto@seravo.fi>2016-07-03 15:26:04 +0300
committerGravatar Otto Kekäläinen <otto@seravo.fi>2016-07-03 15:26:04 +0300
commit3808d091f86e079c8f3437f5cd66bd2c507cef8a (patch)
tree83e72f0b4fb9548251fdb0af74003e1523251226 /src/google/protobuf
parentcae3b0cbb689d0ed1e5da73942a5a9705f3411b0 (diff)
Fix spelling in strings and comments
Diffstat (limited to 'src/google/protobuf')
-rw-r--r--src/google/protobuf/compiler/command_line_interface.cc2
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_message.h2
-rw-r--r--src/google/protobuf/compiler/java/java_helpers.h2
-rw-r--r--src/google/protobuf/compiler/java/java_string_field.cc2
-rwxr-xr-xsrc/google/protobuf/compiler/js/js_generator.cc2
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_field.cc2
-rw-r--r--src/google/protobuf/compiler/parser.h2
-rw-r--r--src/google/protobuf/generated_message_reflection.cc2
-rw-r--r--src/google/protobuf/io/tokenizer.h2
-rw-r--r--src/google/protobuf/map_entry.h2
-rw-r--r--src/google/protobuf/map_field.h4
-rw-r--r--src/google/protobuf/map_field_lite.h2
-rw-r--r--src/google/protobuf/map_lite_unittest.proto2
-rw-r--r--src/google/protobuf/map_test.cc2
-rw-r--r--src/google/protobuf/map_unittest.proto2
-rwxr-xr-xsrc/google/protobuf/reflection.h2
-rw-r--r--src/google/protobuf/repeated_field.h2
-rw-r--r--src/google/protobuf/repeated_field_reflection.h2
-rw-r--r--src/google/protobuf/stubs/bytestream.h2
-rw-r--r--src/google/protobuf/util/field_comparator.cc2
-rw-r--r--src/google/protobuf/util/internal/proto_writer.h2
-rw-r--r--src/google/protobuf/util/message_differencer.cc2
-rw-r--r--src/google/protobuf/util/message_differencer.h2
-rwxr-xr-xsrc/google/protobuf/util/message_differencer_unittest.cc2
-rw-r--r--src/google/protobuf/wire_format.h2
25 files changed, 26 insertions, 26 deletions
diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc
index df6f8afc..435a7b8d 100644
--- a/src/google/protobuf/compiler/command_line_interface.cc
+++ b/src/google/protobuf/compiler/command_line_interface.cc
@@ -614,7 +614,7 @@ CommandLineInterface::MemoryOutputStream::~MemoryOutputStream() {
} else {
// This was an OpenForInsert().
- // If the data doens't end with a clean line break, add one.
+ // If the data doesn't end with a clean line break, add one.
if (!data_.empty() && data_[data_.size() - 1] != '\n') {
data_.push_back('\n');
}
diff --git a/src/google/protobuf/compiler/cpp/cpp_message.h b/src/google/protobuf/compiler/cpp/cpp_message.h
index 31223e13..b1e3fe21 100644
--- a/src/google/protobuf/compiler/cpp/cpp_message.h
+++ b/src/google/protobuf/compiler/cpp/cpp_message.h
@@ -66,7 +66,7 @@ class MessageGenerator {
// Header stuff.
- // Return names for foward declarations of this class and all its nested
+ // Return names for forward declarations of this class and all its nested
// types. A given key in {class,enum}_names will map from a class name to the
// descriptor that was responsible for its inclusion in the map. This can be
// used to associate the descriptor with the code generated for it.
diff --git a/src/google/protobuf/compiler/java/java_helpers.h b/src/google/protobuf/compiler/java/java_helpers.h
index 5316d2f9..829ec3d7 100644
--- a/src/google/protobuf/compiler/java/java_helpers.h
+++ b/src/google/protobuf/compiler/java/java_helpers.h
@@ -243,7 +243,7 @@ inline bool HasGenericServices(const FileDescriptor *file, bool enforce_lite) {
}
inline bool IsLazy(const FieldDescriptor* descriptor, bool enforce_lite) {
- // Currently, the proto-lite version suports lazy field.
+ // Currently, the proto-lite version supports lazy field.
// TODO(niwasaki): Support lazy fields also for other proto runtimes.
if (HasDescriptorMethods(descriptor->file(), enforce_lite)) {
return false;
diff --git a/src/google/protobuf/compiler/java/java_string_field.cc b/src/google/protobuf/compiler/java/java_string_field.cc
index b74c7447..e1e5496a 100644
--- a/src/google/protobuf/compiler/java/java_string_field.cc
+++ b/src/google/protobuf/compiler/java/java_string_field.cc
@@ -715,7 +715,7 @@ GenerateInterfaceMembers(io::Printer* printer) const {
// NOTE: the same method in the implementation class actually returns
// com.google.protobuf.ProtocolStringList (a subclass of List). It's
// changed between protobuf 2.5.0 release and protobuf 2.6.1 release.
- // To retain binary compatibilty with both 2.5.0 and 2.6.1 generated
+ // To retain binary compatibility with both 2.5.0 and 2.6.1 generated
// code, we make this interface method return List so both methods
// with different return types exist in the compiled byte code.
"$deprecation$java.util.List<java.lang.String>\n"
diff --git a/src/google/protobuf/compiler/js/js_generator.cc b/src/google/protobuf/compiler/js/js_generator.cc
index f5185ab1..8a2633d7 100755
--- a/src/google/protobuf/compiler/js/js_generator.cc
+++ b/src/google/protobuf/compiler/js/js_generator.cc
@@ -151,7 +151,7 @@ string StripProto(const string& filename) {
return StripSuffixString(filename, suffix);
}
-// Given a filename like foo/bar/baz.proto, returns the correspoding JavaScript
+// Given a filename like foo/bar/baz.proto, returns the corresponding JavaScript
// file foo/bar/baz.js.
string GetJSFilename(const string& filename) {
return StripProto(filename) + "_pb.js";
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_field.cc b/src/google/protobuf/compiler/objectivec/objectivec_field.cc
index 66cb4a16..812b4a1c 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_field.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_field.cc
@@ -228,7 +228,7 @@ int FieldGenerator::ExtraRuntimeHasBitsNeeded(void) const {
void FieldGenerator::SetExtraRuntimeHasBitsBase(int index_base) {
// NOTE: src/google/protobuf/compiler/plugin.cc makes use of cerr for some
// error cases, so it seems to be ok to use as a back door for errors.
- cerr << "Error: should have overriden SetExtraRuntimeHasBitsBase()." << endl;
+ cerr << "Error: should have overridden SetExtraRuntimeHasBitsBase()." << endl;
cerr.flush();
abort();
}
diff --git a/src/google/protobuf/compiler/parser.h b/src/google/protobuf/compiler/parser.h
index 2c561c23..0f80e78b 100644
--- a/src/google/protobuf/compiler/parser.h
+++ b/src/google/protobuf/compiler/parser.h
@@ -71,7 +71,7 @@ class LIBPROTOBUF_EXPORT Parser {
// it. Returns true if no errors occurred, false otherwise.
bool Parse(io::Tokenizer* input, FileDescriptorProto* file);
- // Optional fetaures:
+ // Optional features:
// DEPRECATED: New code should use the SourceCodeInfo embedded in the
// FileDescriptorProto.
diff --git a/src/google/protobuf/generated_message_reflection.cc b/src/google/protobuf/generated_message_reflection.cc
index 347bac5a..d1f7b5ca 100644
--- a/src/google/protobuf/generated_message_reflection.cc
+++ b/src/google/protobuf/generated_message_reflection.cc
@@ -2126,7 +2126,7 @@ inline void GeneratedMessageReflection::ClearOneofField(
inline void GeneratedMessageReflection::ClearOneof(
Message* message, const OneofDescriptor* oneof_descriptor) const {
// TODO(jieluo): Consider to cache the unused object instead of deleting
- // it. It will be much faster if an aplication switches a lot from
+ // it. It will be much faster if an application switches a lot from
// a few oneof fields. Time/space tradeoff
uint32 oneof_case = GetOneofCase(*message, oneof_descriptor);
if (oneof_case > 0) {
diff --git a/src/google/protobuf/io/tokenizer.h b/src/google/protobuf/io/tokenizer.h
index 64ee7d84..77a873bc 100644
--- a/src/google/protobuf/io/tokenizer.h
+++ b/src/google/protobuf/io/tokenizer.h
@@ -329,7 +329,7 @@ class LIBPROTOBUF_EXPORT Tokenizer {
// depending on what was read. This needs to know if the first
// character was a zero in order to correctly recognize hex and octal
// numbers.
- // It also needs to know if the first characted was a . to parse floating
+ // It also needs to know if the first character was a . to parse floating
// point correctly.
TokenType ConsumeNumber(bool started_with_zero, bool started_with_dot);
diff --git a/src/google/protobuf/map_entry.h b/src/google/protobuf/map_entry.h
index 801e7522..e87eda64 100644
--- a/src/google/protobuf/map_entry.h
+++ b/src/google/protobuf/map_entry.h
@@ -83,7 +83,7 @@ class LIBPROTOBUF_EXPORT MapEntryBase : public Message {
// reflection, its in-memory type is the same as generated message with the same
// fields. However, in order to decide the in-memory type of key/value, we need
// to know both their cpp type in generated api and proto type. In
-// implmentation, all in-memory types have related wire format functions to
+// implementation, all in-memory types have related wire format functions to
// support except ArenaStringPtr. Therefore, we need to define another type with
// supporting wire format functions. Since this type is only used as return type
// of MapEntry accessors, it's named MapEntry accessor type.
diff --git a/src/google/protobuf/map_field.h b/src/google/protobuf/map_field.h
index 4b46f3aa..d6af8532 100644
--- a/src/google/protobuf/map_field.h
+++ b/src/google/protobuf/map_field.h
@@ -54,7 +54,7 @@ class ContendedMapCleanTest;
class GeneratedMessageReflection;
class MapFieldAccessor;
-// This class provides accesss to map field using reflection, which is the same
+// This class provides access to map field using reflection, which is the same
// as those provided for RepeatedPtrField<Message>. It is used for internal
// reflection implentation only. Users should never use this directly.
class LIBPROTOBUF_EXPORT MapFieldBase {
@@ -208,7 +208,7 @@ class TypeDefinedMapFieldBase : public MapFieldBase {
virtual void SetMapIteratorValue(MapIterator* map_iter) const = 0;
};
-// This class provides accesss to map field using generated api. It is used for
+// This class provides access to map field using generated api. It is used for
// internal generated message implentation only. Users should never use this
// directly.
template <typename Key, typename T,
diff --git a/src/google/protobuf/map_field_lite.h b/src/google/protobuf/map_field_lite.h
index 860dae55..a9f30f59 100644
--- a/src/google/protobuf/map_field_lite.h
+++ b/src/google/protobuf/map_field_lite.h
@@ -38,7 +38,7 @@ namespace google {
namespace protobuf {
namespace internal {
-// This class provides accesss to map field using generated api. It is used for
+// This class provides access to map field using generated api. It is used for
// internal generated message implentation only. Users should never use this
// directly.
template <typename Key, typename T,
diff --git a/src/google/protobuf/map_lite_unittest.proto b/src/google/protobuf/map_lite_unittest.proto
index 0592dd7a..0135fff3 100644
--- a/src/google/protobuf/map_lite_unittest.proto
+++ b/src/google/protobuf/map_lite_unittest.proto
@@ -81,7 +81,7 @@ message TestArenaMapLite {
map_int32_foreign_message_no_arena = 18;
}
-// Test embeded message with required fields
+// Test embedded message with required fields
message TestRequiredMessageMapLite {
map<int32, TestRequiredLite> map_field = 1;
}
diff --git a/src/google/protobuf/map_test.cc b/src/google/protobuf/map_test.cc
index dccb31ca..cdd1ccd5 100644
--- a/src/google/protobuf/map_test.cc
+++ b/src/google/protobuf/map_test.cc
@@ -502,7 +502,7 @@ static void StressTestIterators(int n, bool test_old_style_proto2_maps) {
// Test old iterator vs new iterator, with table modification in between.
TestOldVersusNewIterator<Map<int, int>::const_iterator>(n % 3, &m);
TestOldVersusNewIterator<Map<int, int>::iterator>(n % (1 + (n / 40)), &m);
- // Finally, ensure erase(iterator) doesn't reorder anything, becuase that is
+ // Finally, ensure erase(iterator) doesn't reorder anything, because that is
// what its documentation says.
m[last_key] = m[last_key ^ 999] = 0;
vector<Map<int, int>::iterator> v;
diff --git a/src/google/protobuf/map_unittest.proto b/src/google/protobuf/map_unittest.proto
index aea1e8ce..c6154f04 100644
--- a/src/google/protobuf/map_unittest.proto
+++ b/src/google/protobuf/map_unittest.proto
@@ -83,7 +83,7 @@ enum MapEnum {
MAP_ENUM_BAZ = 2;
}
-// Test embeded message with required fields
+// Test embedded message with required fields
message TestRequiredMessageMap {
map<int32, TestRequired> map_field = 1;
}
diff --git a/src/google/protobuf/reflection.h b/src/google/protobuf/reflection.h
index 671aafdc..2391f453 100755
--- a/src/google/protobuf/reflection.h
+++ b/src/google/protobuf/reflection.h
@@ -356,7 +356,7 @@ class LIBPROTOBUF_EXPORT RepeatedFieldAccessor {
virtual void Swap(Field* data, const RepeatedFieldAccessor* other_mutator,
Field* other_data) const = 0;
- // Create an iterator that points at the begining of the repeated field.
+ // Create an iterator that points at the beginning of the repeated field.
virtual Iterator* BeginIterator(const Field* data) const = 0;
// Create an iterator that points at the end of the repeated field.
virtual Iterator* EndIterator(const Field* data) const = 0;
diff --git a/src/google/protobuf/repeated_field.h b/src/google/protobuf/repeated_field.h
index 38358dbb..bc567555 100644
--- a/src/google/protobuf/repeated_field.h
+++ b/src/google/protobuf/repeated_field.h
@@ -2363,7 +2363,7 @@ template<typename T> class RepeatedPtrFieldBackInsertIterator
RepeatedPtrField<T>* field_;
};
-// A back inserter for RepeatedPtrFields that inserts by transfering ownership
+// A back inserter for RepeatedPtrFields that inserts by transferring ownership
// of a pointer.
template<typename T> class AllocatedRepeatedPtrFieldBackInsertIterator
: public std::iterator<std::output_iterator_tag, T> {
diff --git a/src/google/protobuf/repeated_field_reflection.h b/src/google/protobuf/repeated_field_reflection.h
index 44d14d5b..512c0f1d 100644
--- a/src/google/protobuf/repeated_field_reflection.h
+++ b/src/google/protobuf/repeated_field_reflection.h
@@ -94,7 +94,7 @@ class LIBPROTOBUF_EXPORT RepeatedFieldAccessor {
virtual void Swap(Field* data, const RepeatedFieldAccessor* other_mutator,
Field* other_data) const = 0;
- // Create an iterator that points at the begining of the repeated field.
+ // Create an iterator that points at the beginning of the repeated field.
virtual Iterator* BeginIterator(const Field* data) const = 0;
// Create an iterator that points at the end of the repeated field.
virtual Iterator* EndIterator(const Field* data) const = 0;
diff --git a/src/google/protobuf/stubs/bytestream.h b/src/google/protobuf/stubs/bytestream.h
index de8e0204..07604e17 100644
--- a/src/google/protobuf/stubs/bytestream.h
+++ b/src/google/protobuf/stubs/bytestream.h
@@ -208,7 +208,7 @@ class LIBPROTOBUF_EXPORT CheckedArrayByteSink : public ByteSink {
};
// Implementation of ByteSink that allocates an internal buffer (a char array)
-// and expands it as needed to accomodate appended data (similar to a string),
+// and expands it as needed to accommodate appended data (similar to a string),
// and allows the caller to take ownership of the internal buffer via the
// GetBuffer() method. The buffer returned from GetBuffer() must be deleted by
// the caller with delete[]. GetBuffer() also sets the internal buffer to be
diff --git a/src/google/protobuf/util/field_comparator.cc b/src/google/protobuf/util/field_comparator.cc
index 60b8b8a5..a1a56ee6 100644
--- a/src/google/protobuf/util/field_comparator.cc
+++ b/src/google/protobuf/util/field_comparator.cc
@@ -189,7 +189,7 @@ bool DefaultFieldComparator::CompareDoubleOrFloat(const FieldDescriptor& field,
return MathUtil::AlmostEquals(value_1, value_2);
} else {
// Use user-provided fraction and margin. Since they are stored as
- // doubles, we explicitely cast them to types of values provided. This
+ // doubles, we explicitly cast them to types of values provided. This
// is very likely to fail if provided values are not numeric.
return MathUtil::WithinFractionOrMargin(
value_1, value_2, static_cast<T>(tolerance->fraction),
diff --git a/src/google/protobuf/util/internal/proto_writer.h b/src/google/protobuf/util/internal/proto_writer.h
index da121809..8b7c6c34 100644
--- a/src/google/protobuf/util/internal/proto_writer.h
+++ b/src/google/protobuf/util/internal/proto_writer.h
@@ -184,7 +184,7 @@ class LIBPROTOBUF_EXPORT ProtoWriter : public StructuredObjectWriter {
return static_cast<ProtoElement*>(BaseElement::parent());
}
- // Returns true if the index is already taken by a preceeding oneof input.
+ // Returns true if the index is already taken by a preceding oneof input.
bool IsOneofIndexTaken(int32 index);
// Marks the oneof 'index' as taken. Future inputs to this oneof will
diff --git a/src/google/protobuf/util/message_differencer.cc b/src/google/protobuf/util/message_differencer.cc
index fc55c2b9..a6d0cb07 100644
--- a/src/google/protobuf/util/message_differencer.cc
+++ b/src/google/protobuf/util/message_differencer.cc
@@ -1386,7 +1386,7 @@ bool MessageDifferencer::MatchRepeatedFieldIndices(
if (key_comparator != NULL || IsTreatedAsSet(repeated_field)) {
if (scope_ == PARTIAL) {
// When partial matching is enabled, Compare(a, b) && Compare(a, c)
- // doesn't neccessarily imply Compare(b, c). Therefore a naive greedy
+ // doesn't necessarily imply Compare(b, c). Therefore a naive greedy
// algorithm will fail to find a maximum matching.
// Here we use the argumenting path algorithm.
MaximumMatcher::NodeMatchCallback* callback =
diff --git a/src/google/protobuf/util/message_differencer.h b/src/google/protobuf/util/message_differencer.h
index 1abbfcba..654d1a67 100644
--- a/src/google/protobuf/util/message_differencer.h
+++ b/src/google/protobuf/util/message_differencer.h
@@ -278,7 +278,7 @@ class LIBPROTOBUF_EXPORT MessageDifferencer {
const Message& message2,
const vector<SpecificField>& field_path) { }
- // Report that an unkown field is ignored. (see comment above).
+ // Report that an unknown field is ignored. (see comment above).
// Note this is a different function since the last SpecificField in field
// path has a null field. This could break existing Reporter.
virtual void ReportUnknownFieldIgnored(
diff --git a/src/google/protobuf/util/message_differencer_unittest.cc b/src/google/protobuf/util/message_differencer_unittest.cc
index a867c881..ed43c512 100755
--- a/src/google/protobuf/util/message_differencer_unittest.cc
+++ b/src/google/protobuf/util/message_differencer_unittest.cc
@@ -2349,7 +2349,7 @@ TEST_F(ComparisonTest, RepeatedMapFieldTest_RepeatedMessageKey) {
}
TEST_F(ComparisonTest, RepeatedSetOptionTest_Unknown) {
- // Currently, as_set option doens't have affects on unknown field.
+ // Currently, as_set option doesn't have affects on unknown field.
// If needed, this feature will be added by request.
repeated_field_as_set();
unknown1_->AddGroup(245)->AddFixed32(248, 1);
diff --git a/src/google/protobuf/wire_format.h b/src/google/protobuf/wire_format.h
index 941be75b..aaee21f0 100644
--- a/src/google/protobuf/wire_format.h
+++ b/src/google/protobuf/wire_format.h
@@ -315,7 +315,7 @@ inline void WireFormat::VerifyUTF8String(const char* data, int size,
WireFormatLite::VerifyUtf8String(
data, size, static_cast<WireFormatLite::Operation>(op), NULL);
#else
- // Avoid the compiler warning about unsued variables.
+ // Avoid the compiler warning about unused variables.
(void)data; (void)size; (void)op;
#endif
}