@@ -22,7 +22,12 @@ public MinInt16Visitor(bool hasMin, Int16 min)
2222 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
2323 public bool Visit ( Int16 input )
2424 {
25- HasMin = true ;
25+ if ( ! HasMin )
26+ {
27+ Min = input ;
28+ HasMin = true ;
29+ return true ;
30+ }
2631 if ( Min > input )
2732 Min = input ;
2833 return true ;
@@ -69,7 +74,12 @@ public MinInt32Visitor(bool hasMin, Int32 min)
6974 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
7075 public bool Visit ( Int32 input )
7176 {
72- HasMin = true ;
77+ if ( ! HasMin )
78+ {
79+ Min = input ;
80+ HasMin = true ;
81+ return true ;
82+ }
7383 if ( Min > input )
7484 Min = input ;
7585 return true ;
@@ -116,7 +126,12 @@ public MinInt64Visitor(bool hasMin, Int64 min)
116126 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
117127 public bool Visit ( Int64 input )
118128 {
119- HasMin = true ;
129+ if ( ! HasMin )
130+ {
131+ Min = input ;
132+ HasMin = true ;
133+ return true ;
134+ }
120135 if ( Min > input )
121136 Min = input ;
122137 return true ;
@@ -163,7 +178,12 @@ public MinUInt16Visitor(bool hasMin, UInt16 min)
163178 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
164179 public bool Visit ( UInt16 input )
165180 {
166- HasMin = true ;
181+ if ( ! HasMin )
182+ {
183+ Min = input ;
184+ HasMin = true ;
185+ return true ;
186+ }
167187 if ( Min > input )
168188 Min = input ;
169189 return true ;
@@ -210,7 +230,12 @@ public MinUInt32Visitor(bool hasMin, UInt32 min)
210230 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
211231 public bool Visit ( UInt32 input )
212232 {
213- HasMin = true ;
233+ if ( ! HasMin )
234+ {
235+ Min = input ;
236+ HasMin = true ;
237+ return true ;
238+ }
214239 if ( Min > input )
215240 Min = input ;
216241 return true ;
@@ -257,7 +282,12 @@ public MinUInt64Visitor(bool hasMin, UInt64 min)
257282 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
258283 public bool Visit ( UInt64 input )
259284 {
260- HasMin = true ;
285+ if ( ! HasMin )
286+ {
287+ Min = input ;
288+ HasMin = true ;
289+ return true ;
290+ }
261291 if ( Min > input )
262292 Min = input ;
263293 return true ;
@@ -304,7 +334,12 @@ public MinSingleVisitor(bool hasMin, Single min)
304334 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
305335 public bool Visit ( Single input )
306336 {
307- HasMin = true ;
337+ if ( ! HasMin )
338+ {
339+ Min = input ;
340+ HasMin = true ;
341+ return true ;
342+ }
308343 if ( Min > input )
309344 Min = input ;
310345 return true ;
@@ -351,7 +386,12 @@ public MinDoubleVisitor(bool hasMin, Double min)
351386 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
352387 public bool Visit ( Double input )
353388 {
354- HasMin = true ;
389+ if ( ! HasMin )
390+ {
391+ Min = input ;
392+ HasMin = true ;
393+ return true ;
394+ }
355395 if ( Min > input )
356396 Min = input ;
357397 return true ;
@@ -398,7 +438,12 @@ public MinByteVisitor(bool hasMin, Byte min)
398438 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
399439 public bool Visit ( Byte input )
400440 {
401- HasMin = true ;
441+ if ( ! HasMin )
442+ {
443+ Min = input ;
444+ HasMin = true ;
445+ return true ;
446+ }
402447 if ( Min > input )
403448 Min = input ;
404449 return true ;
@@ -445,7 +490,12 @@ public MinSByteVisitor(bool hasMin, SByte min)
445490 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
446491 public bool Visit ( SByte input )
447492 {
448- HasMin = true ;
493+ if ( ! HasMin )
494+ {
495+ Min = input ;
496+ HasMin = true ;
497+ return true ;
498+ }
449499 if ( Min > input )
450500 Min = input ;
451501 return true ;
@@ -492,7 +542,12 @@ public MinDateTimeVisitor(bool hasMin, DateTime min)
492542 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
493543 public bool Visit ( DateTime input )
494544 {
495- HasMin = true ;
545+ if ( ! HasMin )
546+ {
547+ Min = input ;
548+ HasMin = true ;
549+ return true ;
550+ }
496551 if ( Min > input )
497552 Min = input ;
498553 return true ;
0 commit comments