去掉无效函数接口

This commit is contained in:
lovelyyoung 2020-03-17 21:04:43 +08:00
parent e3d48d0d42
commit 9053cedda4
3 changed files with 4 additions and 43 deletions

View File

@ -292,9 +292,9 @@ void GScanO200::usbhotplug_callback(bool isconnect, void* userdata)
void GScanO200::usbhotplug(bool isleft)
{
if (isleft) {
devState = DEV_WRONG;
Error_Code = USB_DISCONNECTED;
m_pImages->setscanflags(false);
//devState = DEV_WRONG;
//Error_Code = USB_DISCONNECTED;
//m_pImages->setscanflags(false);
}
}

View File

@ -198,14 +198,6 @@ void ImageMatQueue::PaniusCount()
atm_orgin_image_remains--;
}
double ImageMatQueue::round_to_n_digits(double x, int n)
{
double scale = pow(10.0, ceil(log10(fabs(x))) + n);
return round(x * scale) / scale;
}
bool ImageMatQueue::empty()
{
return atm_orgin_image_remains == 0 && m_imagedata.Size() == 0 && !is_scanning;

View File

@ -71,11 +71,6 @@ public:
}
}
}
//FILE* fout = fopen("afterBW.bmp", "wb");
//if (fout) {
// fwrite(m_data.data(), 1, m_data.size(), fout);
// fclose(fout);
//}
}
private:
void setBmpFileHeader(const cv::Mat& mat,const int bmpDataLen) {
@ -146,10 +141,6 @@ private:
void proc();
void EnqueueBmpBuffer(std::vector<unsigned char>& bmpdata);
void PaniusCount();
double round_to_n_digits(double x, int n);
//template<typename T>
//T round(T, int bits);
BlockingQueue<std::vector<unsigned char>> m_imagedata;
std::mutex m_Locker;
std::mutex m_mtxJB;
@ -163,26 +154,4 @@ private:
Device::PaperSize papersize;
std::vector<std::shared_ptr<CImageApply>> m_iaList;
BlockingQueue<std::shared_ptr<IDecode>> m_rawBuffs;
};
//
//template<typename T>
//inline T ImageMatQueue::round(T src, int bits)
//{
// if (0 > bits)
// return 0;
// T retVal = 0.0;
// int tmp = 0;
//
// if (0 > src) {
// src *= -1;
// tmp = (int)((src + 0.5 / pow(10.0, bits)) * pow(10.0, bits));
// retVal = ((T)tmp) / pow(10.0, bits);
// src *= -1;
// }
// else
// {
// tmp = (int)((src + 0.5 / pow(10.0, bits)) * pow(10.0, bits));
// retVal = ((T)tmp) / pow(10.0, bits);
// }
// return retVal;
//}
};