From 437caeb90f5e44bb95793c1a34bf95ce5cc6e8ff Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 22 May 2014 13:15:04 +0200 Subject: decoder/vorbis: add "restrict" to pointers in vorbis_interleave() Allows more compiler optimizations. --- src/decoder/plugins/VorbisDecoderPlugin.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/decoder/plugins/VorbisDecoderPlugin.cxx') diff --git a/src/decoder/plugins/VorbisDecoderPlugin.cxx b/src/decoder/plugins/VorbisDecoderPlugin.cxx index 43758c0f6..052dff420 100644 --- a/src/decoder/plugins/VorbisDecoderPlugin.cxx +++ b/src/decoder/plugins/VorbisDecoderPlugin.cxx @@ -162,8 +162,8 @@ vorbis_interleave(float *dest, const float *const*src, { for (const float *const*src_end = src + channels; src != src_end; ++src, ++dest) { - float *d = dest; - for (const float *s = *src, *s_end = s + nframes; + float *gcc_restrict d = dest; + for (const float *gcc_restrict s = *src, *s_end = s + nframes; s != s_end; ++s, d += channels) *d = *s; } -- cgit v1.2.3