Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
a9316863
Commit
a9316863
authored
Jan 27, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcm/SampleFormat: workaround for GCC 4.9 "constexpr" bug
GCC 4.9 has incomplete C++14 support. Specifically, it doesn't allow switch/case in "constexpr" functions.
parent
5bd322bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
NEWS
NEWS
+1
-0
SampleFormat.hxx
src/pcm/SampleFormat.hxx
+8
-2
No files found.
NEWS
View file @
a9316863
ver 0.20.4 (not yet released)
* workaround for GCC 4.9 "constexpr" bug
ver 0.20.3 (2017/01/25)
* protocol
...
...
src/pcm/SampleFormat.hxx
View file @
a9316863
...
...
@@ -64,7 +64,10 @@ enum class SampleFormat : uint8_t {
/**
* Checks whether the sample format is valid.
*/
static
constexpr
inline
bool
#if !GCC_OLDER_THAN(5,0)
constexpr
#endif
static
inline
bool
audio_valid_sample_format
(
SampleFormat
format
)
{
switch
(
format
)
{
...
...
@@ -83,7 +86,10 @@ audio_valid_sample_format(SampleFormat format)
return
false
;
}
static
constexpr
inline
unsigned
#if !GCC_OLDER_THAN(5,0)
constexpr
#endif
static
inline
unsigned
sample_format_size
(
SampleFormat
format
)
{
switch
(
format
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment