Loading tools/streaming_proto/OWNERS 0 → 100644 +1 −0 Original line number Diff line number Diff line mwachens@google.com tools/streaming_proto/cpp/main.cpp +6 −4 Original line number Diff line number Diff line Loading @@ -119,9 +119,8 @@ write_message(stringstream& text, const DescriptorProto& message, const string& text << endl; } static void write_header_file(CodeGeneratorResponse* response, const FileDescriptorProto& file_descriptor) { static void write_header_file(const string& request_parameter, CodeGeneratorResponse* response, const FileDescriptorProto& file_descriptor) { stringstream text; text << "// Generated by protoc-gen-cppstream. DO NOT MODIFY." << endl; Loading Loading @@ -159,6 +158,9 @@ write_header_file(CodeGeneratorResponse* response, const FileDescriptorProto& fi text << endl; text << "#endif // " << header << endl; if (request_parameter.find("experimental_allow_proto3_optional") != string::npos) { response->set_supported_features(CodeGeneratorResponse::FEATURE_PROTO3_OPTIONAL); } CodeGeneratorResponse::File* file_response = response->add_file(); file_response->set_name(make_filename(file_descriptor)); file_response->set_content(text.str()); Loading @@ -182,7 +184,7 @@ int main(int argc, char const *argv[]) for (int i=0; i<N; i++) { const FileDescriptorProto& file_descriptor = request.proto_file(i); if (should_generate_for_file(request, file_descriptor.name())) { write_header_file(&response, file_descriptor); write_header_file(request.parameter(), &response, file_descriptor); } } Loading Loading
tools/streaming_proto/OWNERS 0 → 100644 +1 −0 Original line number Diff line number Diff line mwachens@google.com
tools/streaming_proto/cpp/main.cpp +6 −4 Original line number Diff line number Diff line Loading @@ -119,9 +119,8 @@ write_message(stringstream& text, const DescriptorProto& message, const string& text << endl; } static void write_header_file(CodeGeneratorResponse* response, const FileDescriptorProto& file_descriptor) { static void write_header_file(const string& request_parameter, CodeGeneratorResponse* response, const FileDescriptorProto& file_descriptor) { stringstream text; text << "// Generated by protoc-gen-cppstream. DO NOT MODIFY." << endl; Loading Loading @@ -159,6 +158,9 @@ write_header_file(CodeGeneratorResponse* response, const FileDescriptorProto& fi text << endl; text << "#endif // " << header << endl; if (request_parameter.find("experimental_allow_proto3_optional") != string::npos) { response->set_supported_features(CodeGeneratorResponse::FEATURE_PROTO3_OPTIONAL); } CodeGeneratorResponse::File* file_response = response->add_file(); file_response->set_name(make_filename(file_descriptor)); file_response->set_content(text.str()); Loading @@ -182,7 +184,7 @@ int main(int argc, char const *argv[]) for (int i=0; i<N; i++) { const FileDescriptorProto& file_descriptor = request.proto_file(i); if (should_generate_for_file(request, file_descriptor.name())) { write_header_file(&response, file_descriptor); write_header_file(request.parameter(), &response, file_descriptor); } } Loading