Improve tdtl C++03 compatibility.

This commit is contained in:
levlam 2021-10-20 01:01:22 +03:00
parent 41cc287d66
commit d225bdf073
3 changed files with 3 additions and 2 deletions

View File

@ -40,7 +40,7 @@ void tl_config::add_type(tl_type *type) {
}
tl_type *tl_config::get_type(std::int32_t type_id) const {
auto it = id_to_type.find(type_id);
std::map<std::int32_t, tl_type *>::const_iterator it = id_to_type.find(type_id);
assert(it != id_to_type.end());
return it->second;
}

View File

@ -857,7 +857,7 @@ bool write_tl_to_file(const tl_config &config, const std::string &file_name, con
tl_string_outputer out;
write_tl(config, out, w);
auto old_file_contents = get_file_contents(file_name, "rb");
std::string old_file_contents = get_file_contents(file_name, "rb");
if (!w.is_documentation_generated()) {
old_file_contents = remove_documentation(old_file_contents);
}

View File

@ -18,6 +18,7 @@ namespace tl {
void write_tl(const tl_config &config, tl_outputer &out, const TL_writer &w);
tl_config read_tl_config_from_file(const std::string &file_name);
bool write_tl_to_file(const tl_config &config, const std::string &file_name, const TL_writer &w);
} // namespace tl