@@ -65,7 +65,7 @@ public bool Equals(Coordinate2D c)
6565 // ReSharper restore CompareOfFloatsByEqualityOperator
6666
6767 public override int GetHashCode ( )
68- => X . GetHashCode ( ) ^ PGUtil . RotateShift ( Y . GetHashCode ( ) , sizeof ( int ) / 2 ) ;
68+ => X . GetHashCode ( ) ^ PGUtil . RotateShift ( Y . GetHashCode ( ) , PGUtil . BitsInInt / 2 ) ;
6969
7070 public override bool Equals ( [ CanBeNull ] object obj )
7171 => obj is Coordinate2D && Equals ( ( Coordinate2D ) obj ) ;
@@ -132,7 +132,7 @@ public bool Equals([CanBeNull] PostgisPoint other)
132132
133133 public static bool operator != ( PostgisPoint x , PostgisPoint y ) => ! ( x == y ) ;
134134
135- public override int GetHashCode ( ) => X . GetHashCode ( ) ^ PGUtil . RotateShift ( Y . GetHashCode ( ) , sizeof ( int ) / 2 ) ;
135+ public override int GetHashCode ( ) => X . GetHashCode ( ) ^ PGUtil . RotateShift ( Y . GetHashCode ( ) , PGUtil . BitsInInt / 2 ) ;
136136 }
137137
138138 /// <summary>
@@ -189,7 +189,7 @@ public override int GetHashCode()
189189 {
190190 var ret = 266370105 ; //seed with something other than zero to make paths of all zeros hash differently.
191191 foreach ( var t in _points )
192- ret ^= PGUtil . RotateShift ( t . GetHashCode ( ) , ret % sizeof ( int ) ) ;
192+ ret ^= PGUtil . RotateShift ( t . GetHashCode ( ) , ret % PGUtil . BitsInInt ) ;
193193 return ret ;
194194 }
195195 }
@@ -256,7 +256,7 @@ public override int GetHashCode()
256256 var ret = 266370105 ; //seed with something other than zero to make paths of all zeros hash differently.
257257 for ( var i = 0 ; i < _rings . Length ; i ++ )
258258 for ( var j = 0 ; j < _rings [ i ] . Length ; j ++ )
259- ret ^= PGUtil . RotateShift ( _rings [ i ] [ j ] . GetHashCode ( ) , ret % sizeof ( int ) ) ;
259+ ret ^= PGUtil . RotateShift ( _rings [ i ] [ j ] . GetHashCode ( ) , ret % PGUtil . BitsInInt ) ;
260260 return ret ;
261261 }
262262 }
@@ -318,7 +318,7 @@ public override int GetHashCode()
318318 {
319319 var ret = 266370105 ; //seed with something other than zero to make paths of all zeros hash differently.
320320 for ( var i = 0 ; i < _points . Length ; i ++ )
321- ret ^= PGUtil . RotateShift ( _points [ i ] . GetHashCode ( ) , ret % sizeof ( int ) ) ;
321+ ret ^= PGUtil . RotateShift ( _points [ i ] . GetHashCode ( ) , ret % PGUtil . BitsInInt ) ;
322322 return ret ;
323323 }
324324
@@ -394,7 +394,7 @@ public override int GetHashCode()
394394 {
395395 var ret = 266370105 ; //seed with something other than zero to make paths of all zeros hash differently.
396396 for ( var i = 0 ; i < _lineStrings . Length ; i ++ )
397- ret ^= PGUtil . RotateShift ( _lineStrings [ i ] . GetHashCode ( ) , ret % sizeof ( int ) ) ;
397+ ret ^= PGUtil . RotateShift ( _lineStrings [ i ] . GetHashCode ( ) , ret % PGUtil . BitsInInt ) ;
398398 return ret ;
399399 }
400400
@@ -453,7 +453,7 @@ public override int GetHashCode()
453453 {
454454 var ret = 266370105 ; //seed with something other than zero to make paths of all zeros hash differently.
455455 for ( var i = 0 ; i < _polygons . Length ; i ++ )
456- ret ^= PGUtil . RotateShift ( _polygons [ i ] . GetHashCode ( ) , ret % sizeof ( int ) ) ;
456+ ret ^= PGUtil . RotateShift ( _polygons [ i ] . GetHashCode ( ) , ret % PGUtil . BitsInInt ) ;
457457 return ret ;
458458 }
459459
@@ -516,7 +516,7 @@ public override int GetHashCode()
516516 {
517517 var ret = 266370105 ; //seed with something other than zero to make paths of all zeros hash differently.
518518 for ( var i = 0 ; i < _geometries . Length ; i ++ )
519- ret ^= PGUtil . RotateShift ( _geometries [ i ] . GetHashCode ( ) , ret % sizeof ( int ) ) ;
519+ ret ^= PGUtil . RotateShift ( _geometries [ i ] . GetHashCode ( ) , ret % PGUtil . BitsInInt ) ;
520520 return ret ;
521521 }
522522
0 commit comments