diff --git a/td/generate/tl_writer_cpp.cpp b/td/generate/tl_writer_cpp.cpp index ed65208e9..9853d5130 100644 --- a/td/generate/tl_writer_cpp.cpp +++ b/td/generate/tl_writer_cpp.cpp @@ -25,7 +25,7 @@ std::string TD_TL_writer_cpp::gen_output_begin() const { "#include \"td/utils/logging.h\"\n" "#include \"td/utils/SliceBuilder.h\"\n" "#include \"td/utils/tl_parsers.h\"\n" - "#include \"td/utils/tl_storers.h\"\n\n" + "#include \"td/utils/tl_storers.h\"\n" "#include \"td/utils/TlStorerToString.h\"\n\n" "namespace td {\n" "namespace " + @@ -324,7 +324,8 @@ std::string TD_TL_writer_cpp::gen_store_class_name(const tl::tl_tree_type *tree_ return "TlStoreBool"; } if (name == "True") { - return "TlStoreTrue"; + assert(false); + return ""; } if (name == "String" || name == "Bytes") { return "TlStoreString"; @@ -438,6 +439,13 @@ std::string TD_TL_writer_cpp::gen_field_store(const tl::arg &a, std::vector= 0 && a.var_num < 0 && a.type->get_type() == tl::NODE_TYPE_TYPE) { + const tl::tl_tree_type *tree_type = static_cast(a.type); + if (tree_type->type->name == "True") { + return ""; + } + } + if (a.exist_var_num >= 0) { assert(a.exist_var_num < static_cast(vars.size())); assert(vars[a.exist_var_num].is_stored); diff --git a/td/tl/tl_object_store.h b/td/tl/tl_object_store.h index 191ec1418..196465ac8 100644 --- a/td/tl/tl_object_store.h +++ b/td/tl/tl_object_store.h @@ -47,14 +47,6 @@ class TlStoreBool { } }; -class TlStoreTrue { - public: - template - static void store(const bool &x, StorerT &storer) { - // currently nothing to do - } -}; - class TlStoreBinary { public: template