diff options
author | Chris Robinson <[email protected]> | 2014-07-06 03:27:39 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-07-06 03:27:39 -0700 |
commit | d0a64fe191aabe085cabe1737c44ff6a47a3d4d8 (patch) | |
tree | a22024a773333fd6beb4e1af95af5497477045bd /Alc/backends | |
parent | 5de7271bcd4df9a26301a37ed9cf76ddc6641328 (diff) |
Don't require pre-declaring vector types
Diffstat (limited to 'Alc/backends')
-rw-r--r-- | Alc/backends/alsa.c | 2 | ||||
-rw-r--r-- | Alc/backends/dsound.c | 6 | ||||
-rw-r--r-- | Alc/backends/mmdevapi.c | 2 | ||||
-rw-r--r-- | Alc/backends/pulseaudio.c | 2 | ||||
-rw-r--r-- | Alc/backends/winmm.c | 8 |
5 files changed, 8 insertions, 12 deletions
diff --git a/Alc/backends/alsa.c b/Alc/backends/alsa.c index 0712a412..2d3a8425 100644 --- a/Alc/backends/alsa.c +++ b/Alc/backends/alsa.c @@ -230,7 +230,7 @@ typedef struct { al_string name; al_string device_name; } DevMap; -DECL_VECTOR(DevMap) +TYPEDEF_VECTOR(DevMap, vector_DevMap) static vector_DevMap PlaybackDevices; static vector_DevMap CaptureDevices; diff --git a/Alc/backends/dsound.c b/Alc/backends/dsound.c index 3ca398ed..f5dcfe59 100644 --- a/Alc/backends/dsound.c +++ b/Alc/backends/dsound.c @@ -109,10 +109,10 @@ typedef struct { al_string name; GUID guid; } DevMap; -DECL_VECTOR(DevMap) +TYPEDEF_VECTOR(DevMap, vector_DevMap) -vector_DevMap PlaybackDevices; -vector_DevMap CaptureDevices; +static vector_DevMap PlaybackDevices; +static vector_DevMap CaptureDevices; static void clear_devlist(vector_DevMap *list) { diff --git a/Alc/backends/mmdevapi.c b/Alc/backends/mmdevapi.c index d732c3e1..430e1cb8 100644 --- a/Alc/backends/mmdevapi.c +++ b/Alc/backends/mmdevapi.c @@ -65,7 +65,7 @@ typedef struct { al_string name; WCHAR *devid; } DevMap; -DECL_VECTOR(DevMap) +TYPEDEF_VECTOR(DevMap, vector_DevMap) static void clear_devlist(vector_DevMap *list) { diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c index 58252240..b392f18e 100644 --- a/Alc/backends/pulseaudio.c +++ b/Alc/backends/pulseaudio.c @@ -458,7 +458,7 @@ typedef struct { al_string name; al_string device_name; } DevMap; -DECL_VECTOR(DevMap) +TYPEDEF_VECTOR(DevMap, vector_DevMap) static vector_DevMap PlaybackDevices; static vector_DevMap CaptureDevices; diff --git a/Alc/backends/winmm.c b/Alc/backends/winmm.c index 624af37a..cad66470 100644 --- a/Alc/backends/winmm.c +++ b/Alc/backends/winmm.c @@ -55,17 +55,13 @@ typedef struct { } WinMMData; +TYPEDEF_VECTOR(al_string, vector_al_string) static vector_al_string PlaybackDevices; static vector_al_string CaptureDevices; static void clear_devlist(vector_al_string *list) { - al_string *iter, *end; - - iter = VECTOR_ITER_BEGIN(*list); - end = VECTOR_ITER_END(*list); - for(;iter != end;iter++) - AL_STRING_DEINIT(*iter); + VECTOR_FOR_EACH(al_string, *list, al_string_deinit); VECTOR_RESIZE(*list, 0); } |