From 0fde7131aae5bed711c82af03884aa81f57d1732 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 13 May 2016 15:13:51 -0700 Subject: [PATCH] Fixed usage of anon namespace inside .h --- include/grpc++/impl/codegen/proto_utils.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h index d044ddc642d..3bad468a74e 100644 --- a/include/grpc++/impl/codegen/proto_utils.h +++ b/include/grpc++/impl/codegen/proto_utils.h @@ -49,7 +49,7 @@ namespace grpc { extern CoreCodegenInterface* g_core_codegen_interface; -namespace { +namespace internal { const int kGrpcBufferWriterMaxBufferLength = 8192; @@ -166,7 +166,7 @@ class GrpcBufferReader GRPC_FINAL grpc_byte_buffer_reader reader_; gpr_slice slice_; }; -} // namespace +} // namespace internal template class SerializationTraitsgpr_slice_malloc(byte_size); GPR_CODEGEN_ASSERT( GPR_SLICE_END_PTR(slice) == @@ -185,7 +185,8 @@ class SerializationTraitsgpr_slice_unref(slice); return g_core_codegen_interface->ok(); } else { - GrpcBufferWriter writer(bp, kGrpcBufferWriterMaxBufferLength); + internal::GrpcBufferWriter writer( + bp, internal::kGrpcBufferWriterMaxBufferLength); return msg.SerializeToZeroCopyStream(&writer) ? g_core_codegen_interface->ok() : Status(StatusCode::INTERNAL, "Failed to serialize message"); @@ -200,7 +201,7 @@ class SerializationTraitsok(); { - GrpcBufferReader reader(buffer); + internal::GrpcBufferReader reader(buffer); ::grpc::protobuf::io::CodedInputStream decoder(&reader); if (max_message_size > 0) { decoder.SetTotalBytesLimit(max_message_size, max_message_size);