core refactor.

This commit is contained in:
lhhxxxxx
2022-06-05 17:57:05 +08:00
parent c63194c885
commit e3573d7880
8 changed files with 20 additions and 21 deletions

View File

@@ -522,7 +522,7 @@ cv::Mat asst::Controller::get_resized_image() const
return resized_mat;
}
int asst::Controller::start_game(const ServerType& server_type, bool block)
std::optional<int> asst::Controller::start_game(const std::string& server_type, bool block)
{
if (auto intent_name = Resrc.cfg().get_intent_name(server_type))
{
@@ -534,7 +534,7 @@ int asst::Controller::start_game(const ServerType& server_type, bool block)
}
return id;
}
return -1;
return std::nullopt;
}
int asst::Controller::click(const Point& p, bool block)