From be64ce70494baf855d7f25a63f1b66ff44a43bb5 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 27 Jul 2023 13:02:49 +0300 Subject: [PATCH] Don't generate unused define FAIL. --- td/generate/tl_writer_cpp.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/td/generate/tl_writer_cpp.cpp b/td/generate/tl_writer_cpp.cpp index 725cf1913..05a9b727d 100644 --- a/td/generate/tl_writer_cpp.cpp +++ b/td/generate/tl_writer_cpp.cpp @@ -541,9 +541,7 @@ std::string TD_TL_writer_cpp::gen_fetch_function_begin(const std::string &parser result += "p);\n" "}\n\n" + - class_name + "::" + class_name + "(" + parser_name + - " &p)\n" - "#define FAIL(error) p.set_error(error)\n"; + class_name + "::" + class_name + "(" + parser_name + " &p)\n"; } return result; } @@ -565,8 +563,7 @@ std::string TD_TL_writer_cpp::gen_fetch_function_end(bool has_parent, int field_ if (field_count == 0) { return "}\n"; } - return "#undef FAIL\n" - "{}\n"; + return "{}\n"; } if (parser_type == -1) {