diff options
Diffstat (limited to 'src/google/protobuf/descriptor.h')
-rw-r--r-- | src/google/protobuf/descriptor.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/google/protobuf/descriptor.h b/src/google/protobuf/descriptor.h index f7ee179..361943d 100644 --- a/src/google/protobuf/descriptor.h +++ b/src/google/protobuf/descriptor.h @@ -1,6 +1,6 @@ // Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ +// https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -1594,44 +1594,44 @@ inline bool FieldDescriptor::is_packable() const { // in the parent's array of children. inline int FieldDescriptor::index() const { if (!is_extension_) { - return this - containing_type_->fields_; + return static_cast<int>(this - containing_type_->fields_); } else if (extension_scope_ != NULL) { - return this - extension_scope_->extensions_; + return static_cast<int>(this - extension_scope_->extensions_); } else { - return this - file_->extensions_; + return static_cast<int>(this - file_->extensions_); } } inline int Descriptor::index() const { if (containing_type_ == NULL) { - return this - file_->message_types_; + return static_cast<int>(this - file_->message_types_); } else { - return this - containing_type_->nested_types_; + return static_cast<int>(this - containing_type_->nested_types_); } } inline int OneofDescriptor::index() const { - return this - containing_type_->oneof_decls_; + return static_cast<int>(this - containing_type_->oneof_decls_); } inline int EnumDescriptor::index() const { if (containing_type_ == NULL) { - return this - file_->enum_types_; + return static_cast<int>(this - file_->enum_types_); } else { - return this - containing_type_->enum_types_; + return static_cast<int>(this - containing_type_->enum_types_); } } inline int EnumValueDescriptor::index() const { - return this - type_->values_; + return static_cast<int>(this - type_->values_); } inline int ServiceDescriptor::index() const { - return this - file_->services_; + return static_cast<int>(this - file_->services_); } inline int MethodDescriptor::index() const { - return this - service_->methods_; + return static_cast<int>(this - service_->methods_); } inline const char* FieldDescriptor::type_name() const { |