mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 09:50:40 +08:00
feat: 不使用不安全的 string_view::data() 函数
This commit is contained in:
@@ -138,9 +138,9 @@ bool ProcessTask::_run()
|
||||
int max_times = m_cur_task_ptr->max_times;
|
||||
TimesLimitType limit_type = TimesLimitType::Pre;
|
||||
{
|
||||
std::string_view cur_base_name = cur_name;
|
||||
std::string cur_base_name = cur_name;
|
||||
while (true) {
|
||||
if (auto iter = m_times_limit.find(cur_base_name.data()); iter != m_times_limit.cend()) {
|
||||
if (auto iter = m_times_limit.find(cur_base_name); iter != m_times_limit.cend()) {
|
||||
max_times = iter->second.times;
|
||||
limit_type = iter->second.type;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user