Skip to content

Commit b8d9904

Browse files
Copilotpetesramek
andauthored
style: rename hasItems to anyItemProcessed in EncodeCore
Agent-Logs-Url: https://github.com/petesramek/polyline-algorithm-csharp/sessions/9ad635cf-efe4-4650-86cc-0083af3375f7 Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com>
1 parent ed3d344 commit b8d9904

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/PolylineAlgorithm/PolylineEncoder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ private TPolyline EncodeCore(IEnumerable<TValue> coordinates, PolylineEncodingOp
133133
char[]? rented = null;
134134

135135
int position = 0;
136-
bool hasItems = false;
136+
bool anyItemProcessed = false;
137137

138138
try {
139139
foreach (TValue item in coordinates) {
140140
cancellationToken.ThrowIfCancellationRequested();
141-
hasItems = true;
141+
anyItemProcessed = true;
142142
_formatter.GetValues(item, values);
143143

144144
for (int j = 0; j < width; j++) {
@@ -159,7 +159,7 @@ private TPolyline EncodeCore(IEnumerable<TValue> coordinates, PolylineEncodingOp
159159
}
160160
}
161161

162-
if (!hasItems) {
162+
if (!anyItemProcessed) {
163163
_logger.LogOperationFailedDebug(OperationName);
164164
_logger.LogEmptyArgumentWarning(nameof(coordinates));
165165
ExceptionGuard.ThrowArgumentCannotBeEmptyEnumerationMessage(nameof(coordinates));

0 commit comments

Comments
 (0)