use to_string instead of lexical_cast
this is faster as it doesn't involve creating a temporary stringstream.
This commit is contained in:
parent
1e518a56d8
commit
f3ba474f50
1 changed files with 1 additions and 1 deletions
|
@ -1459,7 +1459,7 @@ void unit::write(config& cfg) const
|
|||
cfg["language_name"] = type_name_;
|
||||
cfg["undead_variation"] = undead_variation_;
|
||||
cfg["level"] = level_;
|
||||
cfg["alignment"] = lexical_cast<std::string> (alignment_);
|
||||
cfg["alignment"] = alignment_.to_string();
|
||||
cfg["flag_rgb"] = flag_rgb_;
|
||||
cfg["unrenamable"] = unrenamable_;
|
||||
cfg["alpha"] = str_cast(alpha_);
|
||||
|
|
Loading…
Add table
Reference in a new issue