MCPcopy Create free account
hub / github.com/TelegramMessenger/cocoon / gen_constructor_parameter

Method gen_constructor_parameter

tl/generate/tl_writer_java.cpp:460–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458}
459
460std::string TD_TL_writer_java::gen_constructor_parameter(int field_num, const std::string &class_name, const tl::arg &a,
461 bool is_default) const {
462 if (is_default) {
463 return "";
464 }
465
466 std::string field_type = gen_field_type(a);
467 if (field_type.empty()) {
468 return "";
469 }
470
471 if (field_type[field_type.size() - 1] != ' ') {
472 field_type += ' ';
473 }
474
475 return (field_num == 0 ? "" : ", ") + field_type + gen_field_name(a.name);
476}
477
478std::string TD_TL_writer_java::gen_constructor_field_init(int field_num, const std::string &class_name,
479 const tl::arg &a, bool is_default) const {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected