aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firebase/Database/Public
diff options
context:
space:
mode:
authorGravatar Ibrahim Ulukaya <ulukaya@gmail.com>2017-11-08 17:22:01 -0500
committerGravatar GitHub <noreply@github.com>2017-11-08 17:22:01 -0500
commit07595ce66bbd90be37940facd8601b3d94eec837 (patch)
treefa0c15255e6f7b33a7bce6bf69819d64639a4a1f /Firebase/Database/Public
parentd400851b29823273036df136eabd815d6ba0d1cf (diff)
Enumerator using generic. Cleaner for .. in .. loop in Swift (#433)
* Enumerator using generic. Cleaner for .. in .. loop in Swift So for childSnapshot in snapshot.children { you don't need to cast each child. Each cild is already known as DataSnapshot * Update FIRDataSnapshot.h * Update FIRMutableData.h * Update FIRMutableData.m
Diffstat (limited to 'Firebase/Database/Public')
-rw-r--r--Firebase/Database/Public/FIRDataSnapshot.h2
-rw-r--r--Firebase/Database/Public/FIRMutableData.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/Firebase/Database/Public/FIRDataSnapshot.h b/Firebase/Database/Public/FIRDataSnapshot.h
index c3082df..e465045 100644
--- a/Firebase/Database/Public/FIRDataSnapshot.h
+++ b/Firebase/Database/Public/FIRDataSnapshot.h
@@ -134,7 +134,7 @@ FIR_SWIFT_NAME(DataSnapshot)
*
* @return An NSEnumerator of the children.
*/
-@property (strong, readonly, nonatomic) NSEnumerator* children;
+@property (strong, readonly, nonatomic) NSEnumerator<FIRDataSnapshot *>* children;
/**
* The priority of the data in this FIRDataSnapshot.
diff --git a/Firebase/Database/Public/FIRMutableData.h b/Firebase/Database/Public/FIRMutableData.h
index 5c26024..4e7250a 100644
--- a/Firebase/Database/Public/FIRMutableData.h
+++ b/Firebase/Database/Public/FIRMutableData.h
@@ -116,7 +116,7 @@ FIR_SWIFT_NAME(MutableData)
* Note that this enumerator operates on an immutable copy of the child list. So, you can modify the instance
* during iteration, but the new additions will not be visible until you get a new enumerator.
*/
-@property (readonly, nonatomic, strong) NSEnumerator* children;
+@property (readonly, nonatomic, strong) NSEnumerator<FIRMutableData *>* children;
/**