fix.修复一些warning

This commit is contained in:
MistEO
2021-12-11 01:27:35 +08:00
parent 94f0eced1c
commit 767a667fbe
2 changed files with 5 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ namespace asst
struct Options
{
ConnectType connect_type; // 连接类型
ConnectType connect_type = ConnectType::Emulator; // 连接类型
int task_delay = 0; // 任务间延时越快操作越快但会增加CPU消耗
int control_delay_lower = 0; // 点击随机延时下限:每次点击操作会进行随机延时
int control_delay_upper = 0; // 点击随机延时上限:每次点击操作会进行随机延时

View File

@@ -95,10 +95,13 @@ namespace asst
asst::utils::get_format_time().c_str(),
level.data(), _getpid(), ::GetCurrentThreadId());
stream_args<true>(std::cout, buff, std::forward<Args>(args)...);
std::ofstream ofs(m_log_filename, std::ios::out | std::ios::app);
stream_args(ofs, buff, std::forward<Args>(args)...);
ofs.close();
#ifdef LOG_TRACE
stream_args<true>(std::cout, buff, std::forward<Args>(args)...);
#endif
}
template <bool ToGbk = false, typename T, typename... Args>