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