aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/libparser/validator.cpp
diff options
context:
space:
mode:
authorRenaud Guezennec <renaud@rolisteam.org>2025-10-07 00:10:02 +0200
committerRenaud Guezennec <renaud@rolisteam.org>2025-11-10 02:39:57 +0000
commit19670fc751782d063fafd43c9be03ecc92572c6b (patch)
tree0c7a3a803324e7cc9f70a6f2f5ed41907b4468e8 /src/libparser/validator.cpp
parent46cb61e9f90a480b0277816ae8d42e5b0c91fe0c (diff)
downloadOneRoll-19670fc751782d063fafd43c9be03ecc92572c6b.tar.gz
OneRoll-19670fc751782d063fafd43c9be03ecc92572c6b.zip
Fix error and cpp style.
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;
}