diff --git a/td/generate/generate_c.cpp b/td/generate/generate_c.cpp index ecd7ca058..4965a04dd 100644 --- a/td/generate/generate_c.cpp +++ b/td/generate/generate_c.cpp @@ -11,10 +11,7 @@ int main() { td::tl::tl_config config_td = td::tl::read_tl_config_from_file("auto/tlo/td_api.tlo"); - td::tl::write_tl_to_file(config_td, "auto/td/telegram/td_tdc_api.h", - td::TlWriterCCommon("TdApi", 1, "#include \"td/telegram/td_api.h\"\n")); - td::tl::write_tl_to_file(config_td, "auto/td/telegram/td_tdc_api_inner.h", - td::TlWriterCCommon("TdApi", -1, "#include \"td/telegram/td_api.h\"\n")); - td::tl::write_tl_to_file(config_td, "auto/td/telegram/td_tdc_api.cpp", - td::TlWriterCCommon("TdApi", 0, "#include \"td/telegram/td_api.h\"\n")); + td::tl::write_tl_to_file(config_td, "auto/td/telegram/td_tdc_api.h", td::TlWriterCCommon("TdApi", 1)); + td::tl::write_tl_to_file(config_td, "auto/td/telegram/td_tdc_api_inner.h", td::TlWriterCCommon("TdApi", -1)); + td::tl::write_tl_to_file(config_td, "auto/td/telegram/td_tdc_api.cpp", td::TlWriterCCommon("TdApi", 0)); } diff --git a/td/generate/tl_writer_c.h b/td/generate/tl_writer_c.h index b10eb9ca5..987babc3b 100644 --- a/td/generate/tl_writer_c.h +++ b/td/generate/tl_writer_c.h @@ -17,11 +17,10 @@ namespace td { class TlWriterCCommon final : public tl::TL_writer { - public: int is_header_; - std::string prefix_; - TlWriterCCommon(const std::string &name, int is_header, const std::string &prefix = "") - : TL_writer(name), is_header_(is_header), prefix_(prefix) { + + public: + TlWriterCCommon(const std::string &name, int is_header) : TL_writer(name), is_header_(is_header) { } int get_max_arity() const final { @@ -1360,4 +1359,5 @@ class TlWriterCCommon final : public tl::TL_writer { return 2; } }; + } // namespace td