AI/Manager: clean up a nasty case of string concat

This commit is contained in:
Charles Dang 2024-07-31 22:11:06 -04:00
parent 3b1eb6580f
commit 40a071fbc5

View file

@ -243,12 +243,10 @@ config holder::to_config() const
const std::string holder::describe_ai()
{
std::string sidestr = std::to_string(this->side_);
if (this->ai_!=nullptr) {
return this->ai_->describe_self()+std::string(" for side ")+sidestr+std::string(" : ");
if(ai_) {
return formatter() << ai_->describe_self() << " for side " << side_ << " : ";
} else {
return std::string("not initialized ai with id=[")+cfg_["id"]+std::string("] for side ")+sidestr+std::string(" : ");
return formatter() << "not initialized ai with id=[" << cfg_["id"] << "] for side " << side_ << " : ";
}
}