aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/csharp/csharp_helpers.h
diff options
context:
space:
mode:
authorJon Skeet <jonskeet@google.com>2016-04-06 10:17:13 +0100
committerJon Skeet <jonskeet@google.com>2016-04-06 10:17:13 +0100
commitbfd1c84a3dab01683c4e97dc401f5a4a264a7e7e (patch)
tree1402a1f716d65adce7b27bd0d1cb01c636e27606 /src/google/protobuf/compiler/csharp/csharp_helpers.h
parent89719f07a35bee3c20e746944773587ac2a47444 (diff)
downloadprotobuf-bfd1c84a3dab01683c4e97dc401f5a4a264a7e7e.tar.gz
protobuf-bfd1c84a3dab01683c4e97dc401f5a4a264a7e7e.tar.bz2
protobuf-bfd1c84a3dab01683c4e97dc401f5a4a264a7e7e.zip
Line-wrapping changes only for C# generator code
This should have no behavioral changes at all. This doesn't strictly enforce an 80-column limit, but removes the most egregious violations. The indentation in the C# generator code is inconsistent in general, unfortunately - if we have any good tools that can be trusted to reformat, I'd be happy to apply them.
Diffstat (limited to 'src/google/protobuf/compiler/csharp/csharp_helpers.h')
-rw-r--r--src/google/protobuf/compiler/csharp/csharp_helpers.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_helpers.h b/src/google/protobuf/compiler/csharp/csharp_helpers.h
index beead038..eaf85014 100644
--- a/src/google/protobuf/compiler/csharp/csharp_helpers.h
+++ b/src/google/protobuf/compiler/csharp/csharp_helpers.h
@@ -83,7 +83,9 @@ std::string GetPropertyName(const FieldDescriptor* descriptor);
int GetFixedSize(FieldDescriptor::Type type);
-std::string UnderscoresToCamelCase(const std::string& input, bool cap_next_letter, bool preserve_period);
+std::string UnderscoresToCamelCase(const std::string& input,
+ bool cap_next_letter,
+ bool preserve_period);
inline std::string UnderscoresToCamelCase(const std::string& input, bool cap_next_letter) {
return UnderscoresToCamelCase(input, cap_next_letter, false);
@@ -96,17 +98,19 @@ std::string StringToBase64(const std::string& input);
std::string FileDescriptorToBase64(const FileDescriptor* descriptor);
-FieldGeneratorBase* CreateFieldGenerator(const FieldDescriptor* descriptor, int fieldOrdinal, const Options* options);
+FieldGeneratorBase* CreateFieldGenerator(const FieldDescriptor* descriptor,
+ int fieldOrdinal,
+ const Options* options);
-// Determines whether the given message is a map entry message, i.e. one implicitly created
-// by protoc due to a map<key, value> field.
+// Determines whether the given message is a map entry message,
+// i.e. one implicitly created by protoc due to a map<key, value> field.
inline bool IsMapEntryMessage(const Descriptor* descriptor) {
return descriptor->options().map_entry();
}
-// Determines whether we're generating code for the proto representation of descriptors etc,
-// for use in the runtime. This is the only type which is allowed to use proto2 syntax,
-// and it generates internal classes.
+// Determines whether we're generating code for the proto representation of
+// descriptors etc, for use in the runtime. This is the only type which is
+// allowed to use proto2 syntax, and it generates internal classes.
inline bool IsDescriptorProto(const FileDescriptor* descriptor) {
return descriptor->name() == "google/protobuf/descriptor.proto";
}