FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Updated sandbox based on recent changes. · ilelann/cpp.react@73b1fbe · GitHub

Commit 73b1fbe

Browse files
committed
Updated sandbox based on recent changes.
1 parent 223960a commit 73b1fbe

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎src/sandbox/Main.cpp‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ void EventExample2()
136136
// stream just indicates that it has fired, i.e. it behaves like a token stream.
137137
auto emitter = D::MakeEventSource();
138138

139-
auto counter = Iterate(0, emitter, Incrementer<int>());
139+
auto counter = Iterate(0, emitter, [] (int v) { return v+1; });
140140

141141
// In this case, the observer func must not declare a parameter for token streams.
142142
Observe(emitter, [] {
@@ -223,7 +223,7 @@ class Manager : public ReactiveObject<D>
223223
Manager(Company& c) :
224224
CurrentCompany{ MakeVar(ref(c)) }
225225
{
226-
nameObs = REACTIVE_REF(CurrentCompany, Name).Observe([] (string name) {
226+
nameObs = Observe(REACTIVE_REF(CurrentCompany, Name), [] (string name) {
227227
cout << "Manager: Now managing " << name << endl;
228228
});
229229
}
@@ -345,8 +345,6 @@ int main()
345345
LoopTest();
346346
#endif
347347

348-
//Debug();
349-
350348
#ifdef REACT_ENABLE_LOGGING
351349
std::ofstream logfile;
352350
logfile.open("log.txt");

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL