mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-22 01:30:49 +08:00
Fix two compiler warnings for serialis.h
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
fe614c6069
commit
c31c1a7d60
@ -90,7 +90,7 @@ class TESS_API TFile {
|
||||
template <typename T> bool DeSerialize(std::vector<T>& data);
|
||||
template <typename T>
|
||||
bool DeSerialize(T *data, size_t count = 1) {
|
||||
return FReadEndian(data, sizeof(T), count) == count;
|
||||
return FReadEndian(data, sizeof(T), count) == static_cast<int>(count);
|
||||
}
|
||||
|
||||
// Serialize data.
|
||||
@ -100,7 +100,7 @@ class TESS_API TFile {
|
||||
bool Serialize(const std::vector<T>& data);
|
||||
template <typename T>
|
||||
bool Serialize(const T *data, size_t count = 1) {
|
||||
return FWrite(data, sizeof(T), count) == count;
|
||||
return FWrite(data, sizeof(T), count) == static_cast<int>(count);
|
||||
}
|
||||
template <typename T>
|
||||
bool SerializeClasses(const std::vector<T> &data) {
|
||||
|
Loading…
Reference in New Issue
Block a user