more [[gnu::...]] attributes
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
* enum. Returns SND_PCM_FORMAT_UNKNOWN if there is no according ALSA
|
||||
* PCM format.
|
||||
*/
|
||||
gcc_const
|
||||
[[gnu::const]]
|
||||
inline snd_pcm_format_t
|
||||
ToAlsaPcmFormat(SampleFormat sample_format) noexcept
|
||||
{
|
||||
@@ -82,7 +82,7 @@ ToAlsaPcmFormat(SampleFormat sample_format) noexcept
|
||||
* Determine the byte-swapped PCM format. Returns
|
||||
* SND_PCM_FORMAT_UNKNOWN if the format cannot be byte-swapped.
|
||||
*/
|
||||
gcc_const
|
||||
[[gnu::const]]
|
||||
inline snd_pcm_format_t
|
||||
ByteSwapAlsaPcmFormat(snd_pcm_format_t fmt) noexcept
|
||||
{
|
||||
@@ -123,8 +123,7 @@ ByteSwapAlsaPcmFormat(snd_pcm_format_t fmt) noexcept
|
||||
* Check if there is a "packed" version of the give PCM format.
|
||||
* Returns SND_PCM_FORMAT_UNKNOWN if not.
|
||||
*/
|
||||
gcc_const
|
||||
inline snd_pcm_format_t
|
||||
constexpr snd_pcm_format_t
|
||||
PackAlsaPcmFormat(snd_pcm_format_t fmt) noexcept
|
||||
{
|
||||
switch (fmt) {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static uint_least32_t
|
||||
ParseAlsaVersion(const char *p) noexcept
|
||||
{
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
#ifndef MPD_ALSA_VERSION_HXX
|
||||
#define MPD_ALSA_VERSION_HXX
|
||||
|
||||
#include "util/Compiler.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
static constexpr uint_least32_t
|
||||
@@ -35,7 +33,7 @@ MakeAlsaVersion(uint_least32_t major, uint_least32_t minor,
|
||||
* Wrapper for snd_asoundlib_version() which translates the resulting
|
||||
* string to an integer constructed with MakeAlsaVersion().
|
||||
*/
|
||||
gcc_const
|
||||
[[gnu::const]]
|
||||
uint_least32_t
|
||||
GetRuntimeAlsaVersion() noexcept;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user