diff options
| author | Nikita Kostovsky <luntik2012@gmail.com> | 2025-01-12 17:57:45 +0100 |
|---|---|---|
| committer | Nikita Kostovsky <luntik2012@gmail.com> | 2025-01-12 17:57:45 +0100 |
| commit | 201d98f63131242bb8871ed0c4a3ae9ebd4ef030 (patch) | |
| tree | 763a52710b3c8021c62b93535692b53de90265e5 /src/pixels.cpp | |
| parent | 4782e81c32392c78025aae1acb4b2ed1d1395908 (diff) | |
start refactoring. non-working commit
Diffstat (limited to 'src/pixels.cpp')
| -rw-r--r-- | src/pixels.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pixels.cpp b/src/pixels.cpp index b314e6a..5aac4a6 100644 --- a/src/pixels.cpp +++ b/src/pixels.cpp @@ -93,3 +93,10 @@ bool Pixels::save(const QString& filename) return true; } + +Pixels::operator bool() const +{ + return std::find_if(pixels.cbegin(), pixels.cend(), [](const auto& p) { + return !qFuzzyIsNull(p) && !std::isnan(p); + }) != pixels.cend(); +} |
