Skip to content

Commit 03c4c12

Browse files
committed
simplified front logic
1 parent d9be2bf commit 03c4c12

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/std/database/front.d

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,11 +424,9 @@ struct BasicRowSet(D,P) {
424424
void rowSetTag();
425425

426426
private Result result_;
427-
private bool ok_;
428427

429428
this(Result result) {
430429
result_ = result;
431-
ok_ = result.rowsFetched != 0;
432430
}
433431

434432
int width() {return result_.data_.columns;}
@@ -482,9 +480,9 @@ struct BasicRowSet(D,P) {
482480
}
483481

484482

485-
bool empty() {return !ok_;}
483+
bool empty() {return result_.rowsFetched_ != 0;}
486484
auto front() {return Row(this);}
487-
void popFront() {ok_ = result_.next();}
485+
void popFront() {result_.next();}
488486
}
489487

490488
struct BasicRow(D,P) {

0 commit comments

Comments
 (0)