Move TL object fetch to cpp.
GitOrigin-RevId: 8700426caa00ca34be9716b9875cd4c87f8dc51f
This commit is contained in:
parent
7b5e6b9362
commit
f404f7799b
@ -516,7 +516,13 @@ std::string TD_TL_writer_cpp::gen_fetch_function_begin(const std::string &parser
|
|||||||
assert(arity == 0);
|
assert(arity == 0);
|
||||||
|
|
||||||
if (parser_type == 0) {
|
if (parser_type == 0) {
|
||||||
return "\n" + class_name + "::" + class_name + "(" + parser_name +
|
return "\n" + fetched_type + class_name + "::fetch(" + parser_name +
|
||||||
|
" &p) {\n"
|
||||||
|
" return make_tl_object<" +
|
||||||
|
class_name +
|
||||||
|
">(p);\n"
|
||||||
|
"}\n\n" +
|
||||||
|
class_name + "::" + class_name + "(" + parser_name +
|
||||||
" &p)\n"
|
" &p)\n"
|
||||||
"#define FAIL(error) p.set_error(error)\n";
|
"#define FAIL(error) p.set_error(error)\n";
|
||||||
}
|
}
|
||||||
|
@ -261,13 +261,8 @@ std::string TD_TL_writer_h::gen_fetch_function_begin(const std::string &parser_n
|
|||||||
if (parser_type == 0) {
|
if (parser_type == 0) {
|
||||||
return "\n"
|
return "\n"
|
||||||
" static " +
|
" static " +
|
||||||
fetched_type + "fetch(" + parser_name +
|
fetched_type + "fetch(" + parser_name + " &p);\n\n" + " explicit " + class_name + "(" + parser_name +
|
||||||
" &p) {\n"
|
" &p);\n";
|
||||||
" return make_tl_object<" +
|
|
||||||
class_name +
|
|
||||||
">(p);\n"
|
|
||||||
" }\n\n" +
|
|
||||||
" explicit " + class_name + "(" + parser_name + " &p);\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(arity == 0);
|
assert(arity == 0);
|
||||||
|
Reference in New Issue
Block a user