Skip to content

Commit 95fcc1f

Browse files
committed
remove useless static keyword
1 parent 1878569 commit 95fcc1f

File tree

3 files changed

+21
-16
lines changed

3 files changed

+21
-16
lines changed

source/soundio/atomics.d

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ extern(C): @nogc: nothrow: __gshared:
55

66
import core.atomic;
77

8-
package:
9-
108
// Simple wrappers around atomic values so that the compiler will catch it if
119
// I accidentally use operators such as +, -, += on them.
1210
alias SoundIoAtomicLong = shared(long);

source/soundio/os.d

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import core.stdc.stdlib: free;
1010
import core.stdc.string;
1111
import core.stdc.errno;
1212

13-
package:
14-
1513
// You may rely on the size of this struct as part of the API and ABI.
1614
struct SoundIoOsMirroredMemory {
1715
size_t capacity;

source/soundio/util.d

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,33 +86,39 @@ auto REALLOCATE_NONZERO(Type)(void* old, size_t new_count) {
8686

8787
alias SOUNDIO_ATTR_NORETURN = typeof(assert(0));
8888

89-
//enum string ARRAY_LENGTH(string array) = ` (sizeof(array)/sizeof((array)[0]))`;
90-
91-
pragma(inline, true) static int soundio_int_min(int a, int b) {
89+
pragma(inline, true)
90+
int soundio_int_min(int a, int b) {
9291
return (a <= b) ? a : b;
9392
}
9493

95-
pragma(inline, true) static int soundio_int_max(int a, int b) {
94+
pragma(inline, true)
95+
int soundio_int_max(int a, int b) {
9696
return (a >= b) ? a : b;
9797
}
9898

99-
pragma(inline, true) static int soundio_int_clamp(int min_value, int value, int max_value) {
99+
package:
100+
pragma(inline, true)
101+
int soundio_int_clamp(int min_value, int value, int max_value) {
100102
return soundio_int_max(soundio_int_min(value, max_value), min_value);
101103
}
102104

103-
pragma(inline, true) static double soundio_double_min(double a, double b) {
105+
pragma(inline, true)
106+
double soundio_double_min(double a, double b) {
104107
return (a <= b) ? a : b;
105108
}
106109

107-
pragma(inline, true) static double soundio_double_max(double a, double b) {
110+
pragma(inline, true)
111+
double soundio_double_max(double a, double b) {
108112
return (a >= b) ? a : b;
109113
}
110114

111-
pragma(inline, true) static double soundio_double_clamp(double min_value, double value, double max_value) {
115+
pragma(inline, true)
116+
double soundio_double_clamp(double min_value, double value, double max_value) {
112117
return soundio_double_max(soundio_double_min(value, max_value), min_value);
113118
}
114119

115-
pragma(inline, true) static char* soundio_str_dupe(const(char)* str, int str_len) {
120+
pragma(inline, true)
121+
char* soundio_str_dupe(const(char)* str, int str_len) {
116122
char* out_ = ALLOCATE_NONZERO!char(str_len + 1);
117123
if (!out_)
118124
return null;
@@ -121,18 +127,21 @@ pragma(inline, true) static char* soundio_str_dupe(const(char)* str, int str_len
121127
return out_;
122128
}
123129

124-
pragma(inline, true) static bool soundio_streql(const(char)* str1, int str1_len, const(char)* str2, int str2_len) {
130+
pragma(inline, true)
131+
bool soundio_streql(const(char)* str1, int str1_len, const(char)* str2, int str2_len) {
125132
if (str1_len != str2_len)
126133
return false;
127134
return memcmp(str1, str2, str1_len) == 0;
128135
}
129136

130-
pragma(inline, true) static int ceil_dbl_to_int(double x) {
137+
pragma(inline, true)
138+
int ceil_dbl_to_int(double x) {
131139
const(double) truncation = cast(int)x;
132140
return cast(int) (truncation + (truncation < x));
133141
}
134142

135-
pragma(inline, true) static double ceil_dbl(double x) {
143+
pragma(inline, true)
144+
double ceil_dbl(double x) {
136145
const(double) truncation = cast(long) x;
137146
const(double) ceiling = truncation + (truncation < x);
138147
return ceiling;

0 commit comments

Comments
 (0)