Merge remote-tracking branch 'origin/project-pineapples' into T1190-MG-Implement-ScanAll-and-ScanAllByLabel-with-MultiFrame_2
This commit is contained in:
commit
59b39e03cb
@ -45,7 +45,11 @@ void MultiFrame::MakeAllFramesInvalid() noexcept {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool MultiFrame::HasValidFrame() const noexcept {
|
bool MultiFrame::HasValidFrame() const noexcept {
|
||||||
return std::any_of(frames_.begin(), frames_.end(), [](auto &frame) { return frame.IsValid(); });
|
return std::any_of(frames_.begin(), frames_.end(), [](const auto &frame) { return frame.IsValid(); });
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MultiFrame::HasInvalidFrame() const noexcept {
|
||||||
|
return std::any_of(frames_.rbegin(), frames_.rend(), [](const auto &frame) { return !frame.IsValid(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOLINTNEXTLINE (bugprone-exception-escape)
|
// NOLINTNEXTLINE (bugprone-exception-escape)
|
||||||
|
@ -82,6 +82,7 @@ class MultiFrame {
|
|||||||
void MakeAllFramesInvalid() noexcept;
|
void MakeAllFramesInvalid() noexcept;
|
||||||
|
|
||||||
bool HasValidFrame() const noexcept;
|
bool HasValidFrame() const noexcept;
|
||||||
|
bool HasInvalidFrame() const noexcept;
|
||||||
|
|
||||||
inline utils::MemoryResource *GetMemoryResource() { return frames_[0].GetMemoryResource(); }
|
inline utils::MemoryResource *GetMemoryResource() { return frames_[0].GetMemoryResource(); }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user