Skip to content

Commit c1be102

Browse files
committed
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>
1 parent 52d392d commit c1be102

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/lstm/networkio.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,9 @@ void NetworkIO::Resize2d(bool int_mode, int width, int num_features) {
5050
// Resizes to a specific stride_map.
5151
void NetworkIO::ResizeToMap(bool int_mode, const StrideMap& stride_map,
5252
int num_features) {
53-
// If this assert fails, it most likely got here through an uninitialized
54-
// scratch element, ie call NetworkScratch::IO::Resizexxx() not
55-
// NetworkIO::Resizexxx()!!
56-
ASSERT_HOST(this != nullptr);
53+
// If this method crashes with this == nullptr,
54+
// it most likely got here through an uninitialized scratch element,
55+
// ie call NetworkScratch::IO::Resizexxx() not NetworkIO::Resizexxx()!!
5756
stride_map_ = stride_map;
5857
int_mode_ = int_mode;
5958
if (int_mode_) {

0 commit comments

Comments
 (0)