@@ -386,7 +386,7 @@ class BRelation : public BObject {
386
386
387
387
BRelation domainForRelations () const {
388
388
BRelation result = BRelation ();
389
- for (const S elem : this ->domain ()) {
389
+ for (const S& elem : this ->domain ()) {
390
390
result = result._union (BRelation (elem));
391
391
}
392
392
return result;
@@ -422,7 +422,7 @@ class BRelation : public BObject {
422
422
423
423
BRelation rangeForRelations () const {
424
424
BRelation result = BRelation ();
425
- for (T elem : this ->range ()) {
425
+ for (const T& elem : this ->range ()) {
426
426
result = result._union (new BRelation ((T) elem));
427
427
}
428
428
return result;
@@ -1120,7 +1120,7 @@ class BRelation : public BObject {
1120
1120
1121
1121
template <typename A1 = typename S::left_type, typename A2 = typename S::right_type>
1122
1122
BBoolean isPartial (const BRelation<A1, A2>& domain) const {
1123
- for (S element : this ->domain ()) {
1123
+ for (const S& element : this ->domain ()) {
1124
1124
BTuple<A1, A2> elementAsTuple = (BTuple<A1, A2>) element;
1125
1125
const immer::set<A2, typename BSet<A2>::Hash, typename BSet<A2>::HashEqual>* rangePtr = domain.map .find (elementAsTuple.projection1 ());
1126
1126
if (rangePtr == nullptr ) {
@@ -1188,7 +1188,7 @@ class BRelation : public BObject {
1188
1188
1189
1189
template <typename A1 = typename S::left_type, typename A2 = typename S::right_type>
1190
1190
BBoolean checkDomain (const BRelation<A1, A2>& domain) const {
1191
- for (S element : this ->domain ()) {
1191
+ for (const S& element : this ->domain ()) {
1192
1192
BTuple<A1, A2> elementAsTuple = (BTuple<A1, A2>) element;
1193
1193
const immer::set<A2, typename BSet<A2>::Hash, typename BSet<A2>::HashEqual>* rangePtr = domain.map .find (elementAsTuple.projection1 ());
1194
1194
if (rangePtr == nullptr ) {
@@ -1255,7 +1255,7 @@ class BRelation : public BObject {
1255
1255
1256
1256
template <typename A1 = typename T::left_type, typename A2 = typename T::right_type>
1257
1257
BBoolean checkRange (const BRelation<A1, A2>& range) const {
1258
- for (S element : this ->range ()) {
1258
+ for (const S& element : this ->range ()) {
1259
1259
BTuple<A1, A2> elementAsTuple = (BTuple<A1, A2>) element;
1260
1260
const immer::set<A2, typename BSet<A2>::Hash, typename BSet<A2>::HashEqual>* rangeRangePtr = range.map .find (elementAsTuple.projection1 ());
1261
1261
if (rangeRangePtr == nullptr ) {
0 commit comments