fix: 修复通用类型定义,提高cmake最低版本以禁用过老的policy

This commit is contained in:
_ChingC
2022-08-29 10:23:08 +08:00
parent 963664469e
commit 84bbe7de1e
2 changed files with 5 additions and 5 deletions

View File

@@ -538,10 +538,10 @@ std::optional<unsigned short> asst::Controller::try_to_init_socket(const std::st
#endif
bool server_start = false;
u_short port_result = 0;
uint16_t port_result = 0;
u_short max_port = try_port + try_times;
for (u_short port = try_port; port < max_port; ++port) {
uint16_t max_port = try_port + try_times;
for (uint16_t port = try_port; port < max_port; ++port) {
if (need_exit()) {
break;
}
@@ -948,7 +948,7 @@ bool asst::Controller::connect(const std::string& adb_path, const std::string& a
const auto adb_cfg = std::move(adb_ret.value());
std::string display_id;
std::string nc_address = "10.0.2.2";
u_short nc_port = 0;
uint16_t nc_port = 0;
// 里面的值每次执行命令后可能更新,所以要用 lambda 拿最新的
auto cmd_replace = [&](const std::string& cfg_cmd) -> std::string {