fix remove op (#10410)

* fix remove op

* update
simplify_fluid_api_recognize_digit
Yancey 7 years ago committed by GitHub
parent 0285a2b95d
commit 2d98a418d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -143,7 +143,7 @@ OpDesc *BlockDesc::InsertOp(size_t index) {
} }
void BlockDesc::RemoveOp(size_t s, size_t e) { void BlockDesc::RemoveOp(size_t s, size_t e) {
if (ops_.begin() + s == ops_.end() || ops_.begin() + e == ops_.end()) { if (ops_.begin() + s >= ops_.end() || ops_.begin() + e > ops_.end()) {
return; return;
} }
need_update_ = true; need_update_ = true;

Loading…
Cancel
Save