mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-02-22 03:40:43 +00:00
Fix plane_it_t skipping the last entry when iterating
This commit is contained in:
parent
35b785ebb8
commit
df2d728af7
@ -186,14 +186,14 @@ namespace platf {
|
||||
public:
|
||||
plane_it_t(int fd, std::uint32_t *plane_p, std::uint32_t *end):
|
||||
fd { fd }, plane_p { plane_p }, end { end } {
|
||||
inc();
|
||||
load_next_valid_plane();
|
||||
}
|
||||
|
||||
plane_it_t(int fd, std::uint32_t *end):
|
||||
fd { fd }, plane_p { end }, end { end } {}
|
||||
|
||||
void
|
||||
inc() {
|
||||
load_next_valid_plane() {
|
||||
this->plane.reset();
|
||||
|
||||
for (; plane_p != end; ++plane_p) {
|
||||
@ -204,13 +204,16 @@ namespace platf {
|
||||
}
|
||||
|
||||
this->plane = util::make_shared<plane_t>(plane.release());
|
||||
|
||||
// One last increment
|
||||
++plane_p;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
inc() {
|
||||
++plane_p;
|
||||
load_next_valid_plane();
|
||||
}
|
||||
|
||||
bool
|
||||
eq(const plane_it_t &other) const {
|
||||
return plane_p == other.plane_p;
|
||||
|
Loading…
x
Reference in New Issue
Block a user