PIVector doc, forEach refactory

This commit is contained in:
Andrey
2022-04-14 15:58:40 +03:00
parent 77e0423375
commit fa93c8a486
5 changed files with 150 additions and 109 deletions

View File

@@ -275,17 +275,12 @@ public:
mat.clear();
}
const PIVector2D<T> & forEach(std::function<void(const T &)> f) const {
void forEach(std::function<void(const T &)> f) const {
mat.forEach(f);
return *this;
}
PIVector2D<T> copyForEach(std::function<T(const T &)> f) const {
PIVector2D<T> ret(*this);
ret.mat = mat.copyForEach(f);
return ret;
}
PIVector2D<T> & forEachInplace(std::function<T(const T &)> f) {
mat.forEachInplace(f);
PIVector2D<T> & forEach(std::function<void(T &)> f) {
mat.forEach(f);
return *this;
}