Skip to content

Commit

Permalink
remove redundant static of enum
Browse files Browse the repository at this point in the history
  • Loading branch information
0-v-0 authored and dlang-bot committed Jun 28, 2024
1 parent 3b17592 commit c29c71c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion druntime/src/core/internal/traits.d
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ unittest
static assert(is(BaseElemOf!(int[1][2]) == int));
static assert(is(BaseElemOf!(int[1][]) == int[1][]));
static assert(is(BaseElemOf!(int[][1]) == int[]));
static enum E : int[2]{ test = [0, 1] }
enum E : int[2]{ test = [0, 1] }
static assert(is(BaseElemOf!(E) == int));
}

Expand Down
4 changes: 2 additions & 2 deletions druntime/src/core/runtime.d
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ extern (C) UnitTestResult runModuleUnitTests()

static extern (C) void unittestSegvHandler( int signum, siginfo_t* info, void* ptr ) nothrow
{
static enum MAXFRAMES = 128;
enum MAXFRAMES = 128;
void*[MAXFRAMES] callstack;

auto numframes = backtrace( callstack.ptr, MAXFRAMES );
Expand Down Expand Up @@ -877,7 +877,7 @@ else static if (hasExecinfo) private class DefaultTraceInfo : Throwable.TraceInf

private:
int numframes;
static enum MAXFRAMES = 128;
enum MAXFRAMES = 128;
void*[MAXFRAMES] callstack = void;

private:
Expand Down
8 changes: 4 additions & 4 deletions druntime/src/core/sys/windows/stacktrace.d
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ public:
if (context is null)
{
version (Win64)
static enum INTERNALFRAMES = 3;
enum INTERNALFRAMES = 3;
else version (Win32)
static enum INTERNALFRAMES = 2;
enum INTERNALFRAMES = 2;

skip += INTERNALFRAMES; //skip the stack frames within the StackTrace class
}
else
{
//When a exception context is given the first stack frame is repeated for some reason
version (Win64)
static enum INTERNALFRAMES = 1;
enum INTERNALFRAMES = 1;
else version (Win32)
static enum INTERNALFRAMES = 1;
enum INTERNALFRAMES = 1;

skip += INTERNALFRAMES;
}
Expand Down
2 changes: 1 addition & 1 deletion druntime/src/rt/tracegc.d
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private string generateTraceWrappers()
return code;
}

static enum ParamPos { front, back }
enum ParamPos { front, back }

private string generateWrapper(alias Declaration, ParamPos pos = ParamPos.front)()
{
Expand Down

0 comments on commit c29c71c

Please sign in to comment.