Improve tdtl C++03 compatibility.
This commit is contained in:
parent
41cc287d66
commit
d225bdf073
@ -40,7 +40,7 @@ void tl_config::add_type(tl_type *type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tl_type *tl_config::get_type(std::int32_t type_id) const {
|
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());
|
assert(it != id_to_type.end());
|
||||||
return it->second;
|
return it->second;
|
||||||
}
|
}
|
||||||
|
@ -857,7 +857,7 @@ bool write_tl_to_file(const tl_config &config, const std::string &file_name, con
|
|||||||
tl_string_outputer out;
|
tl_string_outputer out;
|
||||||
write_tl(config, out, w);
|
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()) {
|
if (!w.is_documentation_generated()) {
|
||||||
old_file_contents = remove_documentation(old_file_contents);
|
old_file_contents = remove_documentation(old_file_contents);
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ namespace tl {
|
|||||||
void write_tl(const tl_config &config, tl_outputer &out, const TL_writer &w);
|
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);
|
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);
|
bool write_tl_to_file(const tl_config &config, const std::string &file_name, const TL_writer &w);
|
||||||
|
|
||||||
} // namespace tl
|
} // namespace tl
|
||||||
|
Loading…
x
Reference in New Issue
Block a user