From ae93b65b1f189a6084c3496db8e370a8e9888fb3 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Mon, 8 Oct 2018 13:47:16 +0200 Subject: [PATCH] Plumbing: Remove comparison which is always false Warning from LGTM: Comparison is always false because index >= 0. Signed-off-by: Stefan Weil --- src/lstm/plumbing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lstm/plumbing.cpp b/src/lstm/plumbing.cpp index be716aa0ab..7fbf802f87 100644 --- a/src/lstm/plumbing.cpp +++ b/src/lstm/plumbing.cpp @@ -174,7 +174,7 @@ float* Plumbing::LayerLearningRatePtr(const char* id) const { ASSERT_HOST(*next_id == ':'); return plumbing->LayerLearningRatePtr(next_id + 1); } - if (index < 0 || index >= learning_rates_.size()) return nullptr; + if (index >= learning_rates_.size()) return nullptr; return &learning_rates_[index]; }