File tree 1 file changed +2
-9
lines changed
1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -60,34 +60,27 @@ class Countable {
60
60
};
61
61
62
62
template <typename T>
63
- class TestEventListener : public Countable ,
64
- public firebase::firestore::EventListener<T> {
63
+ class TestEventListener : public Countable {
65
64
public:
66
65
explicit TestEventListener (std::string name) : name_(std::move(name)) {}
67
66
68
67
void OnEvent (const T& value,
69
68
const firebase::firestore::Error error_code,
70
- const std::string& error_message) override {
69
+ const std::string& error_message) {
71
70
event_count_++;
72
71
if (error_code != firebase::firestore::kErrorOk ) {
73
72
LogMessage (" ERROR: EventListener %s got %d (%s)." , name_.c_str (),
74
73
error_code, error_message.c_str ());
75
74
}
76
75
}
77
76
78
- // Hides the STLPort-related quirk that `AddSnapshotListener` has different
79
- // signatures depending on whether `std::function` is available.
80
77
template <typename U>
81
78
firebase::firestore::ListenerRegistration AttachTo (U* ref) {
82
- #if !defined(STLPORT)
83
79
return ref->AddSnapshotListener (
84
80
[this ](const T& result, firebase::firestore::Error error_code,
85
81
const std::string& error_message) {
86
82
OnEvent (result, error_code, error_message);
87
83
});
88
- #else
89
- return ref->AddSnapshotListener (this );
90
- #endif
91
84
}
92
85
93
86
private:
You can’t perform that action at this time.
0 commit comments