Converted C-style array declarations to D-style

This commit is contained in:
Hackerpilot 2013-07-03 00:06:32 +00:00
parent 3be7a03168
commit 13a6e6ac5c
11 changed files with 15 additions and 15 deletions

View file

@ -4012,7 +4012,7 @@ unittest
struct BoyerMooreFinder(alias pred, Range)
{
private:
size_t skip[];
size_t[] skip;
ptrdiff_t[ElementType!(Range)] occ;
Range needle;

View file

@ -368,7 +368,7 @@ enum
_ALP = _UC|_LC,
}
immutable ubyte _ctype[128] =
immutable ubyte[128] _ctype =
[
_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,
_CTL,_CTL|_SPC,_CTL|_SPC,_CTL|_SPC,_CTL|_SPC,_CTL|_SPC,_CTL,_CTL,

View file

@ -36,7 +36,7 @@ struct tipc_subscr
tipc_name_seq seq;
uint timeout;
uint filter;
ubyte usr_handle[8];
ubyte[8] usr_handle;
}
struct tipc_event

View file

@ -38,7 +38,7 @@ struct GUID { // size is 16
DWORD Data1;
WORD Data2;
WORD Data3;
BYTE Data4[8];
BYTE[8] Data4;
}
enum

View file

@ -25,8 +25,8 @@ struct WSADATA
{
WORD wVersion;
WORD wHighVersion;
char szDescription[WSADESCRIPTION_LEN + 1];
char szSystemStatus[WSASYS_STATUS_LEN + 1];
char[WSADESCRIPTION_LEN + 1] szDescription;
char[WSASYS_STATUS_LEN + 1] szSystemStatus;
USHORT iMaxSockets;
USHORT iMaxUdpDg;
char* lpVendorInfo;

View file

@ -168,7 +168,7 @@ struct MD5
{
private:
// 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
ubyte[64] _buffer; // input buffer

View file

@ -169,7 +169,7 @@ struct RIPEMD160
{
private:
// 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
ubyte[64] _buffer; // input buffer

View file

@ -243,7 +243,7 @@ struct SHA1
}
private:
uint state[5] = /* state (ABCDE) */
uint[5] state = /* state (ABCDE) */
/* magic initialization constants */
[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0];

View file

@ -179,12 +179,12 @@ struct MD5_CTX
{
private import core.stdc.string : memcpy, memset;
uint state[4] = /* state (ABCD) */
uint[4] state = /* state (ABCD) */
/* magic initialization constants */
[0x67452301,0xefcdab89,0x98badcfe,0x10325476];
ulong count; /* number of bits, modulo 2^64 */
ubyte buffer[64]; /* input buffer */
ubyte[64] buffer; /* input buffer */
static ubyte[64] PADDING =
[

View file

@ -37,7 +37,7 @@ private
class OutBuffer
{
ubyte data[];
ubyte[] data;
size_t offset;
invariant()

View file

@ -700,7 +700,7 @@ Always $(D 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 */
UIntType _y = UIntType.max;
}