mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-05 02:47:00 +08:00
Fix compiler warning [-Wtautological-undefined-compare]
clang warning: src/lstm/networkio.cpp:56:15: warning: 'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare] Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
52d392da50
commit
c1be1024be
@ -50,10 +50,9 @@ void NetworkIO::Resize2d(bool int_mode, int width, int num_features) {
|
||||
// Resizes to a specific stride_map.
|
||||
void NetworkIO::ResizeToMap(bool int_mode, const StrideMap& stride_map,
|
||||
int num_features) {
|
||||
// If this assert fails, it most likely got here through an uninitialized
|
||||
// scratch element, ie call NetworkScratch::IO::Resizexxx() not
|
||||
// NetworkIO::Resizexxx()!!
|
||||
ASSERT_HOST(this != nullptr);
|
||||
// If this method crashes with this == nullptr,
|
||||
// it most likely got here through an uninitialized scratch element,
|
||||
// ie call NetworkScratch::IO::Resizexxx() not NetworkIO::Resizexxx()!!
|
||||
stride_map_ = stride_map;
|
||||
int_mode_ = int_mode;
|
||||
if (int_mode_) {
|
||||
|
Loading…
Reference in New Issue
Block a user