feat: 不使用不安全的 string_view::data() 函数

This commit is contained in:
zzyyyl
2022-10-06 02:05:20 +08:00
parent 0f705361f3
commit c3ff8f1268

View File

@@ -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;