Skip to content

Commit

Permalink
Improve tdtl C++03 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Oct 19, 2021
1 parent 41cc287 commit d225bdf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tdtl/td/tl/tl_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion tdtl/td/tl/tl_generate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions tdtl/td/tl/tl_generate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d225bdf

Please sign in to comment.