@@ -12,55 +12,56 @@ public unsafe struct pointer
12
12
public override int GetHashCode ( ) => ( ( int ) Address ) ^ ( ( int ) ( Address >> 32 ) ) ;
13
13
14
14
#region Operators
15
- public static pointer operator + ( pointer a , pointer b ) => a . Address + b . Address ;
16
- public static pointer operator - ( pointer a , pointer b ) => a . Address - b . Address ;
17
- public static pointer operator ++ ( pointer self ) => self . Address ++ ;
18
- public static pointer operator -- ( pointer self ) => self . Address -- ;
19
- public static pointer operator ~ ( pointer self ) => ~ self . Address ;
20
- public static pointer operator * ( pointer a , pointer b ) => a . Address * b . Address ;
21
- public static pointer operator / ( pointer a , pointer b ) => a . Address / b . Address ;
22
- public static pointer operator % ( pointer a , pointer b ) => a . Address % b . Address ;
23
- public static pointer operator & ( pointer a , pointer b ) => a . Address & b . Address ;
24
- public static pointer operator ^ ( pointer a , pointer b ) => a . Address ^ b . Address ;
25
- public static pointer operator | ( pointer a , pointer b ) => a . Address | b . Address ;
26
- public static pointer operator >> ( pointer a , int shift ) => a . Address >> shift ;
27
- public static pointer operator << ( pointer a , int shift ) => a . Address << shift ;
28
- public static pointer operator >>> ( pointer a , int shift ) => a . Address >>> shift ;
29
- public static bool operator < ( pointer a , pointer b ) => a . Address < b . Address ;
30
- public static bool operator <= ( pointer a , pointer b ) => a . Address <= b . Address ;
31
- public static bool operator > ( pointer a , pointer b ) => a . Address > b . Address ;
32
- public static bool operator >= ( pointer a , pointer b ) => a . Address >= b . Address ;
33
- public static bool operator == ( pointer a , pointer b ) => a . Address == b . Address ;
34
- public static bool operator != ( pointer a , pointer b ) => a . Address != b . Address ;
15
+ [ MethodImpl ( AggressiveInlining ) ] public static pointer operator + ( pointer a , pointer b ) => a . Address + b . Address ;
16
+ [ MethodImpl ( AggressiveInlining ) ] public static pointer operator - ( pointer a , pointer b ) => a . Address - b . Address ;
17
+ [ MethodImpl ( AggressiveInlining ) ] public static pointer operator ++ ( pointer self ) => self . Address ++ ;
18
+ [ MethodImpl ( AggressiveInlining ) ] public static pointer operator -- ( pointer self ) => self . Address -- ;
19
+ [ MethodImpl ( AggressiveInlining ) ] public static pointer operator ~ ( pointer self ) => ~ self . Address ;
20
+ [ MethodImpl ( AggressiveInlining ) ] public static pointer operator * ( pointer a , pointer b ) => a . Address * b . Address ;
21
+ [ MethodImpl ( AggressiveInlining ) ] public static pointer operator / ( pointer a , pointer b ) => a . Address / b . Address ;
22
+ [ MethodImpl ( AggressiveInlining ) ] public static pointer operator % ( pointer a , pointer b ) => a . Address % b . Address ;
23
+ [ MethodImpl ( AggressiveInlining ) ] public static pointer operator & ( pointer a , pointer b ) => a . Address & b . Address ;
24
+ [ MethodImpl ( AggressiveInlining ) ] public static pointer operator ^ ( pointer a , pointer b ) => a . Address ^ b . Address ;
25
+ [ MethodImpl ( AggressiveInlining ) ] public static pointer operator | ( pointer a , pointer b ) => a . Address | b . Address ;
26
+ [ MethodImpl ( AggressiveInlining ) ] public static pointer operator >> ( pointer a , int shift ) => a . Address >> shift ;
27
+ [ MethodImpl ( AggressiveInlining ) ] public static pointer operator << ( pointer a , int shift ) => a . Address << shift ;
28
+ [ MethodImpl ( AggressiveInlining ) ] public static pointer operator >>> ( pointer a , int shift ) => a . Address >>> shift ;
29
+ [ MethodImpl ( AggressiveInlining ) ] public static bool operator < ( pointer a , pointer b ) => a . Address < b . Address ;
30
+ [ MethodImpl ( AggressiveInlining ) ] public static bool operator <= ( pointer a , pointer b ) => a . Address <= b . Address ;
31
+ [ MethodImpl ( AggressiveInlining ) ] public static bool operator > ( pointer a , pointer b ) => a . Address > b . Address ;
32
+ [ MethodImpl ( AggressiveInlining ) ] public static bool operator >= ( pointer a , pointer b ) => a . Address >= b . Address ;
33
+ [ MethodImpl ( AggressiveInlining ) ] public static bool operator == ( pointer a , pointer b ) => a . Address == b . Address ;
34
+ [ MethodImpl ( AggressiveInlining ) ] public static bool operator != ( pointer a , pointer b ) => a . Address != b . Address ;
35
35
#endregion
36
36
37
37
#region Implicits
38
- public static implicit operator pointer ( nint address ) => new ( address ) ;
39
- public static implicit operator pointer ( void * pointer ) => new ( ( nint ) pointer ) ;
40
- public static implicit operator pointer ( void * * pointer ) => new ( ( nint ) pointer ) ;
41
- public static implicit operator pointer ( void * * * pointer ) => new ( ( nint ) pointer ) ;
42
- public static implicit operator pointer ( delegate * unmanaged< void > ptr ) => new ( ( nint ) ptr ) ;
43
-
44
- public static implicit operator nint ( pointer pointer ) => pointer . Address ;
45
- public static implicit operator nuint ( pointer pointer ) => ( nuint ) pointer . Address ;
46
- public static implicit operator long ( pointer pointer ) => pointer . Address ;
47
- public static implicit operator ulong ( pointer pointer ) => ( ulong ) pointer . Address ;
48
-
49
- public static implicit operator void * ( pointer pointer ) => ( void * ) pointer . Address ;
50
- public static implicit operator void * * ( pointer pointer ) => ( void * * ) pointer . Address ;
51
- public static implicit operator void * * * ( pointer Sudden_Reference_To_Bocchi_The_Rock ) => ( void * * * ) Sudden_Reference_To_Bocchi_The_Rock . Address ;
52
-
53
- public static implicit operator byte * ( pointer pointer ) => ( byte * ) pointer . Address ;
54
- public static implicit operator sbyte * ( pointer pointer ) => ( sbyte * ) pointer . Address ;
55
- public static implicit operator short * ( pointer pointer ) => ( short * ) pointer . Address ;
56
- public static implicit operator ushort * ( pointer pointer ) => ( ushort * ) pointer . Address ;
57
- public static implicit operator int * ( pointer pointer ) => ( int * ) pointer . Address ;
58
- public static implicit operator uint * ( pointer pointer ) => ( uint * ) pointer . Address ;
59
- public static implicit operator long * ( pointer pointer ) => ( long * ) pointer . Address ;
60
- public static implicit operator ulong * ( pointer pointer ) => ( ulong * ) pointer . Address ;
61
- public static implicit operator nint * ( pointer pointer ) => ( nint * ) pointer . Address ;
62
- public static implicit operator nuint * ( pointer pointer ) => ( nuint * ) pointer . Address ;
63
-
64
- public static implicit operator delegate * unmanaged< void > ( pointer pointer ) => ( delegate * unmanaged< void > ) pointer ;
38
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator pointer ( nint address ) => new ( address ) ;
39
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator pointer ( nuint address ) => new ( ( nint ) address ) ;
40
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator pointer ( long address ) => new ( ( nint ) address ) ;
41
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator pointer ( ulong address ) => new ( ( nint ) address ) ;
42
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator pointer ( int address ) => new ( address ) ;
43
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator pointer ( uint address ) => new ( ( nint ) address ) ;
44
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator pointer ( void * pointer ) => new ( ( nint ) pointer ) ;
45
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator pointer ( void * * pointer ) => new ( ( nint ) pointer ) ;
46
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator pointer ( void * * * pointer ) => new ( ( nint ) pointer ) ;
47
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator pointer ( delegate * unmanaged< void > ptr ) => new ( ( nint ) ptr ) ;
48
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator nint ( pointer pointer ) => pointer . Address ;
49
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator nuint ( pointer pointer ) => ( nuint ) pointer . Address ;
50
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator long ( pointer pointer ) => pointer . Address ;
51
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator ulong ( pointer pointer ) => ( ulong ) pointer . Address ;
52
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator void * ( pointer pointer ) => ( void * ) pointer . Address ;
53
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator void * * ( pointer pointer ) => ( void * * ) pointer . Address ;
54
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator void * * * ( pointer Sudden_Reference_To_Bocchi_The_Rock ) => ( void * * * ) Sudden_Reference_To_Bocchi_The_Rock . Address ;
55
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator byte * ( pointer pointer ) => ( byte * ) pointer . Address ;
56
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator sbyte * ( pointer pointer ) => ( sbyte * ) pointer . Address ;
57
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator short * ( pointer pointer ) => ( short * ) pointer . Address ;
58
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator ushort * ( pointer pointer ) => ( ushort * ) pointer . Address ;
59
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator int * ( pointer pointer ) => ( int * ) pointer . Address ;
60
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator uint * ( pointer pointer ) => ( uint * ) pointer . Address ;
61
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator long * ( pointer pointer ) => ( long * ) pointer . Address ;
62
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator ulong * ( pointer pointer ) => ( ulong * ) pointer . Address ;
63
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator nint * ( pointer pointer ) => ( nint * ) pointer . Address ;
64
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator nuint * ( pointer pointer ) => ( nuint * ) pointer . Address ;
65
+ [ MethodImpl ( AggressiveInlining ) ] public static implicit operator delegate * unmanaged< void > ( pointer pointer ) => ( delegate * unmanaged< void > ) pointer ;
65
66
#endregion
66
67
}
0 commit comments