aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/libparser/validator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libparser/validator.cpp')
-rw-r--r--src/libparser/validator.cpp32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/libparser/validator.cpp b/src/libparser/validator.cpp
index 201574b..a001b9e 100644
--- a/src/libparser/validator.cpp
+++ b/src/libparser/validator.cpp
@@ -28,13 +28,15 @@ template <typename Functor>
qint64 Validator::onEach(const std::vector<Die*>& b, bool recursive, bool unlight, Functor functor) const
{
qint64 result= 0;
- std::for_each(b.begin(), b.end(), [this, recursive, unlight, functor, &result](Die* die) {
- if(hasValid(die, recursive, unlight))
- {
- ++result;
- functor(die, recursive, unlight);
- }
- });
+ std::for_each(b.begin(), b.end(),
+ [this, recursive, unlight, functor, &result](Die* die)
+ {
+ if(hasValid(die, recursive, unlight))
+ {
+ ++result;
+ functor(die, recursive, unlight);
+ }
+ });
return result;
}
@@ -42,13 +44,15 @@ template <typename Functor>
qint64 Validator::onEachValue(const std::vector<Die*>& b, bool recursive, bool unlight, Functor functor) const
{
qint64 result= 0;
- std::for_each(b.begin(), b.end(), [this, recursive, unlight, functor, &result](Die* die) {
- if(hasValid(die, recursive, unlight))
- {
- ++result;
- functor(die, recursive, unlight);
- }
- });
+ std::for_each(b.begin(), b.end(),
+ [this, recursive, unlight, functor, &result](Die* die)
+ {
+ if(hasValid(die, recursive, unlight))
+ {
+ ++result;
+ functor(die, recursive, unlight);
+ }
+ });
return result;
}