Skip to content

Commit b92c32e

Browse files
committed
Rename DistinctUntilChanged class to OperatorDistinctUntilChanged for consistency and clarity in the ReactiveArduino library
1 parent e53ffed commit b92c32e

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/Operators/OperatorDistinctUntilChanged.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Unless required by applicable law or agreed to in writing, software distributed
1111
#define _REACTIVEOPERATORDISTINCT_h
1212

1313
template <typename T>
14-
class DistinctUntilChanged : public Operator<T, T>
14+
class OperatorDistinctUntilChanged : public Operator<T, T>
1515
{
1616
public:
1717
DistinctUntilChanged();
@@ -24,12 +24,12 @@ class DistinctUntilChanged : public Operator<T, T>
2424
};
2525

2626
template <typename T>
27-
DistinctUntilChanged<T>::DistinctUntilChanged()
27+
OperatorDistinctUntilChanged<T>::OperatorDistinctUntilChanged()
2828
{
2929
}
3030

3131
template <typename T>
32-
void DistinctUntilChanged<T>::OnNext(T value)
32+
void OperatorDistinctUntilChanged<T>::OnNext(T value)
3333
{
3434
if (!_any || (_any && _last != value))
3535
this->_childObservers.OnNext(value);

src/ReactiveArduinoCore.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ template <typename T> class FilterIsZero;
5555

5656
template <typename T> class OperatorWhere;
5757
template <typename T> class OperatorDistinct;
58-
template <typename T> class DistinctUntilChanged;
58+
template <typename T> class OperatorDistinctUntilChanged;
5959
template <typename T> class OperatorLast;
6060
template <typename T> class OperatorFirst;
6161
template <typename T> class OperatorTake;
@@ -172,7 +172,7 @@ class Observable : IObservable<T>, IResetable<T>
172172
// "Fluent" behavior
173173
OperatorWhere<T>& Where(ReactivePredicate<T> condition);
174174
OperatorDistinct<T>& Distinct();
175-
OperatorDistinctUntilChanged<T>& DistinctUntilChanged();
175+
DistinctUntilChanged<T>& DistinctUntilChanged();
176176
OperatorFirst<T>& First();
177177
OperatorLast<T>& Last();
178178
OperatorSkip<T>& Skip(size_t num);
@@ -300,9 +300,9 @@ auto Observable<T>::Distinct() -> OperatorDistinct<T>&
300300
}
301301

302302
template <typename T>
303-
auto Observable<T>::DistinctUntilChanged() -> OperatorDistinctUntilChanged<T>&
303+
auto Observable<T>::DistinctUntilChanged() -> DistinctUntilChanged<T>&
304304
{
305-
auto newOp = new OperatorDistinctUntilChanged<T>();
305+
auto newOp = new DistinctUntilChanged<T>();
306306
Compound(*this, *newOp);
307307
return *newOp;
308308
}

src/ReactiveArduinoLib.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ namespace Reactive
243243
}
244244

245245
template <typename T>
246-
OperatorDistinctUntilChanged<T>& DistinctUntilChanged()
246+
DistinctUntilChanged<T>& DistinctUntilChanged()
247247
{
248-
return *(new OperatorDistinctUntilChanged<T>());
248+
return *(new DistinctUntilChanged<T>());
249249
}
250250

251251
template <typename T>

0 commit comments

Comments
 (0)