diff options
author | kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2008-11-06 21:36:28 +0000 |
---|---|---|
committer | kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2008-11-06 21:36:28 +0000 |
commit | de754375737bf251e2ddc5bb6904c74da0954a25 (patch) | |
tree | 9713eba58506229bc3ce7a51ba1cae7b2f4a3691 /src/google | |
parent | 3e91fcdd873ae12e3d0943d3fda6abea39fd0e2b (diff) | |
download | protobuf-de754375737bf251e2ddc5bb6904c74da0954a25.tar.gz protobuf-de754375737bf251e2ddc5bb6904c74da0954a25.tar.bz2 protobuf-de754375737bf251e2ddc5bb6904c74da0954a25.zip |
Simplify some template usage so that older compilers can handle it. (Users
report that MSVC 2003 in particular needs this change.)
Diffstat (limited to 'src/google')
-rw-r--r-- | src/google/protobuf/descriptor.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/google/protobuf/descriptor.cc b/src/google/protobuf/descriptor.cc index 0f243ce5..b843a06b 100644 --- a/src/google/protobuf/descriptor.cc +++ b/src/google/protobuf/descriptor.cc @@ -1693,6 +1693,9 @@ class DescriptorBuilder { template<class DescriptorT> void AllocateOptions( const typename DescriptorT::OptionsType& orig_options, DescriptorT* descriptor); + // Specialization for FileOptions. + void AllocateOptions(const FileOptions& orig_options, + FileDescriptor* descriptor); // Implementation for AllocateOptions(). Don't call this directly. template<class DescriptorT> void AllocateOptionsImpl( @@ -2208,9 +2211,8 @@ template<class DescriptorT> void DescriptorBuilder::AllocateOptions( } // We specialize for FileDescriptor. -template<> void DescriptorBuilder::AllocateOptions<FileDescriptor>( - const FileDescriptor::OptionsType& orig_options, - FileDescriptor* descriptor) { +void DescriptorBuilder::AllocateOptions(const FileOptions& orig_options, + FileDescriptor* descriptor) { // We add the dummy token so that LookupSymbol does the right thing. AllocateOptionsImpl(descriptor->package() + ".dummy", descriptor->name(), orig_options, descriptor); |