Skip to content

Commit 88bae35

Browse files
committed
[NFC] Rename Generator::getCurrent() to Generator::get()
Just for brevity's sake.
1 parent debc8d9 commit 88bae35

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

include/swift/Basic/Generators.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
// concept SimpleGenerator : Generator {
3232
// type reference;
3333
//
34+
// // Get the current value.
35+
// reference get();
36+
//
37+
// // Get the current value and then advance the generator.
3438
// reference claimNext();
3539
// }
3640
//
@@ -103,15 +107,15 @@ class ArrayRefGenerator {
103107
}
104108

105109
/// Return the current element of the array.
106-
reference getCurrent() const {
110+
reference get() const {
107111
assert(!isFinished());
108112
return values.front();
109113
}
110114

111115
/// Claim the current element of the array and advance past it.
112116
reference claimNext() {
113117
assert(!isFinished());
114-
reference result = getCurrent();
118+
reference result = get();
115119
advance();
116120
return result;
117121
}

0 commit comments

Comments
 (0)