chore: 修复Clang/GCC编译警告

This commit is contained in:
Hao Guan
2023-03-20 19:35:40 +10:00
parent 2e3bd3397d
commit ffdb9b1123
15 changed files with 35 additions and 23 deletions

View File

@@ -62,7 +62,7 @@ bool asst::CopilotTask::set_params(const json::value& params)
if (loop_times > 1) {
m_subtasks.reserve(m_subtasks.size() * loop_times);
auto raw_end = m_subtasks.end();
for (int i = 1; i < loop_times; ++i) {
for (size_t i = 1; i < loop_times; ++i) {
// FIXME: 如果多次调用 set_params这里复制的会有问题
m_subtasks.insert(m_subtasks.end(), m_subtasks.begin(), raw_end);
}