调整尺寸检测崩溃问题

This commit is contained in:
13038267101 2022-07-08 10:33:05 +08:00
parent a651b16904
commit 41eeca78f4
1 changed files with 5 additions and 5 deletions

View File

@ -867,15 +867,15 @@ int hg_scanner::set_color_change(void)
int hg_scanner::invoke_setting_xxx(int(hg_scanner::*func)(int, void*), void* data)
{
int ret = SCANNER_ERR_DEVICE_NOT_SUPPORT;
map<int, int(hg_scanner::*)(int, void*)>::iterator it = setting_map_.begin();
auto it = setting_map_.begin();
while (it != setting_map_.end())
{
if (it->second == &hg_scanner::setting_restore)
if (it->second == func)
{
ret = (this->*it->second)(it->first, data);
break;
}
++it;
}
return ret;
@ -1096,8 +1096,8 @@ int hg_scanner::setting_paper(int sn, void* data)
ret = SCANNER_ERR_NOT_EXACT;
if (save_sizecheck)
{
setting_paper_check(0,(void*)&save_sizecheck);
//invoke_setting_xxx(&hg_scanner::setting_paper_check, &save_sizecheck);
//setting_paper_check(0,(void*)&save_sizecheck);
invoke_setting_xxx(&hg_scanner::setting_paper_check, &save_sizecheck);
}
VLOG_MINI_3(LOG_LEVEL_DEBUG_INFO, "Change paper from %s to %s = %s\n", paper_string(old).c_str(), (char*)data, hg_scanner_err_name(ret));