Skip to content

Commit

Permalink
Plumbing: Remove comparison which is always false
Browse files Browse the repository at this point in the history
Warning from LGTM:

    Comparison is always false because index >= 0.

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Oct 8, 2018
1 parent 944816a commit ae93b65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lstm/plumbing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

Expand Down

0 comments on commit ae93b65

Please sign in to comment.