Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion etc/c/odbc/sqlext.d
Original file line number Diff line number Diff line change
Expand Up @@ -1565,7 +1565,7 @@ int SQL_POSITION_TO()
)
{
return SQLSetPos( hstmt, irow, SQL_POSITION, SQL_LOCK_NO_CHANGE );
};
}

int SQL_LOCK_RECORD()
(
Expand Down
18 changes: 9 additions & 9 deletions etc/c/odbc/sqltypes.d
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ struct DATE_STRUCT
SQLSMALLINT year;
SQLUSMALLINT month;
SQLUSMALLINT day;
};
}

alias DATE_STRUCT SQL_DATE_STRUCT;

Expand All @@ -87,7 +87,7 @@ struct TIME_STRUCT
SQLUSMALLINT hour;
SQLUSMALLINT minute;
SQLUSMALLINT second;
};
}

alias TIME_STRUCT SQL_TIME_STRUCT;

Expand All @@ -100,7 +100,7 @@ struct TIMESTAMP_STRUCT
SQLUSMALLINT minute;
SQLUSMALLINT second;
SQLUINTEGER fraction;
};
}

alias TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT;

Expand Down Expand Up @@ -129,7 +129,7 @@ struct SQL_YEAR_MONTH_STRUCT
{
SQLUINTEGER year;
SQLUINTEGER month;
};
}

struct SQL_DAY_SECOND_STRUCT
{
Expand All @@ -138,7 +138,7 @@ struct SQL_DAY_SECOND_STRUCT
SQLUINTEGER minute;
SQLUINTEGER second;
SQLUINTEGER fraction;
};
}

struct SQL_INTERVAL_STRUCT
{
Expand All @@ -148,8 +148,8 @@ struct SQL_INTERVAL_STRUCT
union intval {
SQL_YEAR_MONTH_STRUCT year_month;
SQL_DAY_SECOND_STRUCT day_second;
};
};
}
}

// * internal representation of numeric data type *
const int SQL_MAX_NUMERIC_LEN = 16;
Expand All @@ -159,7 +159,7 @@ struct SQL_NUMERIC_STRUCT
SQLSCHAR scale;
SQLCHAR sign; /* 1 if positive, 0 if negative */
SQLCHAR[ SQL_MAX_NUMERIC_LEN ] val;
};
}

/* size is 16 */
struct SQLGUID
Expand All @@ -168,7 +168,7 @@ struct SQLGUID
WORD Data2;
WORD Data3;
ubyte[ 8 ] Data4;
};
}

alias SQLGUID GUID;
alias uint BOOKMARK;
Expand Down
2 changes: 1 addition & 1 deletion std/c/process.d
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ int execlpe(in char *, in char *,...);

//These constants are undefined elsewhere and only used in the deprecated part
//of std.process.
enum { _P_WAIT, _P_NOWAIT, _P_OVERLAY };
enum { _P_WAIT, _P_NOWAIT, _P_OVERLAY }

//These declarations are defined for Posix in core.sys.posix.unistd but unused
//from here.
Expand Down
2 changes: 1 addition & 1 deletion std/concurrency.d
Original file line number Diff line number Diff line change
Expand Up @@ -1947,7 +1947,7 @@ private
assert( msg.convertsTo!(Tid) );
auto tid = msg.get!(Tid);

if ( bool* pDepends = (tid in thisInfo.links) )
if ( bool* pDepends = tid in thisInfo.links )
{
auto depends = *pDepends;
thisInfo.links.remove( tid );
Expand Down
10 changes: 2 additions & 8 deletions std/datetime.d
Original file line number Diff line number Diff line change
Expand Up @@ -20941,10 +20941,7 @@ assert(PosInfInterval!Date(Date(1996, 1, 2)).begin == Date(1996, 1, 2));
assert(!PosInfInterval!Date(Date(1996, 1, 2)).empty);
--------------------
+/
@property bool empty() const pure nothrow
{
return false;
}
@property enum bool empty = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be marked as @property anymore either.



/++
Expand Down Expand Up @@ -23133,10 +23130,7 @@ assert(NegInfInterval!Date(Date(2012, 3, 1)).end == Date(2012, 3, 1));
assert(!NegInfInterval!Date(Date(1996, 1, 2)).empty);
--------------------
+/
@property bool empty() const pure nothrow
{
return false;
}
@property enum bool empty = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.



/++
Expand Down
5 changes: 3 additions & 2 deletions std/getopt.d
Original file line number Diff line number Diff line change
Expand Up @@ -1613,8 +1613,9 @@ unittest // Issue 14724
}
catch(Exception e)
{
assert(false, "If the request for help was passed required options"
"must not be set.");
enum errorMsg = "If the request for help was passed required options" ~
"must not be set.";
assert(false, errorMsg);
}

assert(rslt.helpWanted);
Expand Down
2 changes: 1 addition & 1 deletion std/internal/math/biguintcore.d
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ public:
++evenbits;
}

if ((x.data.length- firstnonzero == 2))
if (x.data.length- firstnonzero == 2)
{
// Check for a single digit straddling a digit boundary
BigDigit x1 = x.data[firstnonzero+1];
Expand Down
4 changes: 2 additions & 2 deletions std/internal/math/biguintnoasm.d
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public:
alias BigDigit = uint; // A Bignum is an array of BigDigits.

// Limits for when to switch between multiplication algorithms.
enum : int { KARATSUBALIMIT = 10 }; // Minimum value for which Karatsuba is worthwhile.
enum : int { KARATSUBASQUARELIMIT=12 }; // Minimum value for which square Karatsuba is worthwhile
enum int KARATSUBALIMIT = 10; // Minimum value for which Karatsuba is worthwhile.
enum int KARATSUBASQUARELIMIT = 12; // Minimum value for which square Karatsuba is worthwhile


/** Multi-byte addition or subtraction
Expand Down
4 changes: 2 additions & 2 deletions std/internal/test/dummyrange.d
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import std.traits : isArray;
struct DummyRange(ReturnBy _r, Length _l, RangeType _rt, T = uint[])
if (isArray!T)
{
private enum uinttestData =
private static immutable uinttestData =
[1U, 2U, 3U, 4U, 5U, 6U, 7U, 8U, 9U, 10U];
// These enums are so that the template params are visible outside
// this instantiation.
Expand All @@ -61,7 +61,7 @@ struct DummyRange(ReturnBy _r, Length _l, RangeType _rt, T = uint[])
// Workaround for DMD bug 4378
static if (is(T == uint[]))
{
arr = uinttestData;
arr = uinttestData.dup;
}
}

Expand Down
2 changes: 1 addition & 1 deletion std/math.d
Original file line number Diff line number Diff line change
Expand Up @@ -5056,7 +5056,7 @@ bool isSubnormal(X)(X x) @trusted pure nothrow @nogc
ushort e = F.EXPMASK & (cast(ushort *)&x)[F.EXPPOS_SHORT];
long* ps = cast(long *)&x;
return (e == 0 &&
(((ps[MANTISSA_LSB]|(ps[MANTISSA_MSB]& 0x0000_FFFF_FFFF_FFFF))) != 0));
((ps[MANTISSA_LSB]|(ps[MANTISSA_MSB]& 0x0000_FFFF_FFFF_FFFF)) != 0));
}
else static if (F.realFormat == RealFormat.ieeeExtended)
{
Expand Down
2 changes: 1 addition & 1 deletion std/meta.d
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ unittest
///
unittest
{
enum REF = [0, 1, 2, 3];
static immutable REF = [0, 1, 2, 3];
foreach (I, V; aliasSeqOf!([0, 1, 2, 3]))
{
static assert(V == I);
Expand Down
2 changes: 1 addition & 1 deletion std/process.d
Original file line number Diff line number Diff line change
Expand Up @@ -3329,7 +3329,7 @@ private void toAStringz(in string[] a, const(char)**az)

// Incorporating idea (for spawnvp() on Posix) from Dave Fladebo

enum { _P_WAIT, _P_NOWAIT, _P_OVERLAY };
enum { _P_WAIT, _P_NOWAIT, _P_OVERLAY }
version(Windows) extern(C) int spawnvp(int, in char *, in char **);
alias P_WAIT = _P_WAIT;
alias P_NOWAIT = _P_NOWAIT;
Expand Down
2 changes: 1 addition & 1 deletion std/range/primitives.d
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ unittest
{
char c;
enum empty = false;
void popFront(){};
void popFront(){}
ref char front() return @property
{
return c;
Expand Down
2 changes: 1 addition & 1 deletion std/regex/internal/generator.d
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ module std.regex.internal.generator;
return app.data;
}

@property empty(){ return false; }
@property enum empty = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be @property then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #4250 ;-)


void popFront()
{
Expand Down
4 changes: 2 additions & 2 deletions std/regex/internal/ir.d
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ struct Input(Char)
{
import std.utf;
alias DataIndex = size_t;
enum { isLoopback = false };
enum bool isLoopback = false;
alias String = const(Char)[];
String _origin;
size_t _index;
Expand Down Expand Up @@ -641,7 +641,7 @@ struct BackLooperImpl(Input)
import std.utf;
alias DataIndex = size_t;
alias String = Input.String;
enum { isLoopback = true };
enum bool isLoopback = true;
String _origin;
size_t _index;
this(Input input, size_t index)
Expand Down
2 changes: 1 addition & 1 deletion std/string.d
Original file line number Diff line number Diff line change
Expand Up @@ -4380,7 +4380,7 @@ unittest

assert(detabber(" \u2029\t".byChar, 9).array == " \u2029 ");
auto r = "hel\tx".byWchar.detabber();
assert(r.front == 'h' && r.front == 'h');
assert(r.front == 'h');
auto s = r.save;
r.popFront();
r.popFront();
Expand Down
6 changes: 3 additions & 3 deletions std/traits.d
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private
/* Demangles mstr as FuncAttrs. */
Demangle!uint demangleFunctionAttributes(string mstr)
{
enum LOOKUP_ATTRIBUTE =
immutable LOOKUP_ATTRIBUTE =
[
'a': FunctionAttribute.pure_,
'b': FunctionAttribute.nothrow_,
Expand Down Expand Up @@ -1916,7 +1916,7 @@ template SetFunctionAttributes(T, string linkage, uint attrs)
!(attrs & FunctionAttribute.safe),
"Cannot have a function/delegate that is both trusted and safe.");

enum linkages = ["D", "C", "Windows", "Pascal", "C++", "System"];
static immutable linkages = ["D", "C", "Windows", "Pascal", "C++", "System"];
static assert(canFind(linkages, linkage), "Invalid linkage '" ~
linkage ~ "', must be one of " ~ linkages.stringof ~ ".");

Expand Down Expand Up @@ -5651,7 +5651,7 @@ unittest
{
void foo();
static int bar() { return 42; }
enum aa = [ 1: -1 ];
immutable aa = [ 1: -1 ];
alias myint = int;

static assert( isExpressionTuple!(42));
Expand Down
4 changes: 2 additions & 2 deletions std/uni.d
Original file line number Diff line number Diff line change
Expand Up @@ -7299,7 +7299,7 @@ enum UnicodeDecomposition {
enum {
Canonical = UnicodeDecomposition.Canonical,
Compatibility = UnicodeDecomposition.Compatibility
};
}

/++
Try to canonically compose 2 $(CHARACTERS).
Expand Down Expand Up @@ -7571,7 +7571,7 @@ enum {
NFKC = NormalizationForm.NFKC,
///ditto
NFKD = NormalizationForm.NFKD
};
}

/++
Returns $(D input) string normalized to the chosen form.
Expand Down
2 changes: 1 addition & 1 deletion std/uuid.d
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public struct UUID
throw new UUIDParsingException(to!string(uuid), 35, UUIDParsingException.Reason.tooMuch,
"Input is too long, need exactly 36 characters");
}
enum skipInd = [skipSeq];
static immutable skipInd = [skipSeq];
foreach (pos; skipInd)
if (uuid[pos] != '-')
throw new UUIDParsingException(to!string(uuid), pos,
Expand Down