mirror of
https://github.com/dlang/phobos.git
synced 2025-05-02 08:00:48 +03:00
Converted C-style array declarations to D-style
This commit is contained in:
parent
3be7a03168
commit
13a6e6ac5c
11 changed files with 15 additions and 15 deletions
|
@ -4012,7 +4012,7 @@ unittest
|
||||||
struct BoyerMooreFinder(alias pred, Range)
|
struct BoyerMooreFinder(alias pred, Range)
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
size_t skip[];
|
size_t[] skip;
|
||||||
ptrdiff_t[ElementType!(Range)] occ;
|
ptrdiff_t[ElementType!(Range)] occ;
|
||||||
Range needle;
|
Range needle;
|
||||||
|
|
||||||
|
|
|
@ -368,7 +368,7 @@ enum
|
||||||
_ALP = _UC|_LC,
|
_ALP = _UC|_LC,
|
||||||
}
|
}
|
||||||
|
|
||||||
immutable ubyte _ctype[128] =
|
immutable ubyte[128] _ctype =
|
||||||
[
|
[
|
||||||
_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,
|
_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,
|
||||||
_CTL,_CTL|_SPC,_CTL|_SPC,_CTL|_SPC,_CTL|_SPC,_CTL|_SPC,_CTL,_CTL,
|
_CTL,_CTL|_SPC,_CTL|_SPC,_CTL|_SPC,_CTL|_SPC,_CTL|_SPC,_CTL,_CTL,
|
||||||
|
|
|
@ -36,7 +36,7 @@ struct tipc_subscr
|
||||||
tipc_name_seq seq;
|
tipc_name_seq seq;
|
||||||
uint timeout;
|
uint timeout;
|
||||||
uint filter;
|
uint filter;
|
||||||
ubyte usr_handle[8];
|
ubyte[8] usr_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct tipc_event
|
struct tipc_event
|
||||||
|
|
|
@ -38,7 +38,7 @@ struct GUID { // size is 16
|
||||||
DWORD Data1;
|
DWORD Data1;
|
||||||
WORD Data2;
|
WORD Data2;
|
||||||
WORD Data3;
|
WORD Data3;
|
||||||
BYTE Data4[8];
|
BYTE[8] Data4;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
|
|
@ -25,8 +25,8 @@ struct WSADATA
|
||||||
{
|
{
|
||||||
WORD wVersion;
|
WORD wVersion;
|
||||||
WORD wHighVersion;
|
WORD wHighVersion;
|
||||||
char szDescription[WSADESCRIPTION_LEN + 1];
|
char[WSADESCRIPTION_LEN + 1] szDescription;
|
||||||
char szSystemStatus[WSASYS_STATUS_LEN + 1];
|
char[WSASYS_STATUS_LEN + 1] szSystemStatus;
|
||||||
USHORT iMaxSockets;
|
USHORT iMaxSockets;
|
||||||
USHORT iMaxUdpDg;
|
USHORT iMaxUdpDg;
|
||||||
char* lpVendorInfo;
|
char* lpVendorInfo;
|
||||||
|
|
|
@ -168,7 +168,7 @@ struct MD5
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
// magic initialization constants
|
// magic initialization constants
|
||||||
uint _state[4] = [0x67452301,0xefcdab89,0x98badcfe,0x10325476]; // state (ABCD)
|
uint[4] _state = [0x67452301,0xefcdab89,0x98badcfe,0x10325476]; // state (ABCD)
|
||||||
ulong _count; //number of bits, modulo 2^64
|
ulong _count; //number of bits, modulo 2^64
|
||||||
ubyte[64] _buffer; // input buffer
|
ubyte[64] _buffer; // input buffer
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,7 @@ struct RIPEMD160
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
// magic initialization constants
|
// magic initialization constants
|
||||||
uint _state[5] = [0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0]; // state (ABCDE)
|
uint[5] _state = [0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0]; // state (ABCDE)
|
||||||
ulong _count; //number of bits, modulo 2^64
|
ulong _count; //number of bits, modulo 2^64
|
||||||
ubyte[64] _buffer; // input buffer
|
ubyte[64] _buffer; // input buffer
|
||||||
|
|
||||||
|
|
|
@ -243,7 +243,7 @@ struct SHA1
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint state[5] = /* state (ABCDE) */
|
uint[5] state = /* state (ABCDE) */
|
||||||
/* magic initialization constants */
|
/* magic initialization constants */
|
||||||
[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0];
|
[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0];
|
||||||
|
|
||||||
|
|
|
@ -179,12 +179,12 @@ struct MD5_CTX
|
||||||
{
|
{
|
||||||
private import core.stdc.string : memcpy, memset;
|
private import core.stdc.string : memcpy, memset;
|
||||||
|
|
||||||
uint state[4] = /* state (ABCD) */
|
uint[4] state = /* state (ABCD) */
|
||||||
/* magic initialization constants */
|
/* magic initialization constants */
|
||||||
[0x67452301,0xefcdab89,0x98badcfe,0x10325476];
|
[0x67452301,0xefcdab89,0x98badcfe,0x10325476];
|
||||||
|
|
||||||
ulong count; /* number of bits, modulo 2^64 */
|
ulong count; /* number of bits, modulo 2^64 */
|
||||||
ubyte buffer[64]; /* input buffer */
|
ubyte[64] buffer; /* input buffer */
|
||||||
|
|
||||||
static ubyte[64] PADDING =
|
static ubyte[64] PADDING =
|
||||||
[
|
[
|
||||||
|
|
|
@ -37,7 +37,7 @@ private
|
||||||
|
|
||||||
class OutBuffer
|
class OutBuffer
|
||||||
{
|
{
|
||||||
ubyte data[];
|
ubyte[] data;
|
||||||
size_t offset;
|
size_t offset;
|
||||||
|
|
||||||
invariant()
|
invariant()
|
||||||
|
|
|
@ -700,7 +700,7 @@ Always $(D false).
|
||||||
*/
|
*/
|
||||||
enum bool empty = false;
|
enum bool empty = false;
|
||||||
|
|
||||||
private UIntType mt[n];
|
private UIntType[n] mt;
|
||||||
private size_t mti = size_t.max; /* means mt is not initialized */
|
private size_t mti = size_t.max; /* means mt is not initialized */
|
||||||
UIntType _y = UIntType.max;
|
UIntType _y = UIntType.max;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue