@@ -86,33 +86,39 @@ auto REALLOCATE_NONZERO(Type)(void* old, size_t new_count) {
8686
8787alias 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