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
86a37d0e
Commit
86a37d0e
authored
Jul 16, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Main, pcm/SampleFormat, command/Error: remove obsolete GCC version checks
parent
2fb5dbe6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
50 deletions
+5
-50
Main.cxx
src/Main.cxx
+1
-7
CommandError.cxx
src/command/CommandError.cxx
+0
-33
SampleFormat.hxx
src/pcm/SampleFormat.hxx
+4
-10
No files found.
src/Main.cxx
View file @
86a37d0e
...
...
@@ -118,13 +118,7 @@ static constexpr size_t MEGABYTE = 1024 * KILOBYTE;
static
constexpr
size_t
DEFAULT_BUFFER_SIZE
=
4
*
MEGABYTE
;
static
#if GCC_OLDER_THAN(5,0)
/* gcc 4.x has no "constexpr" for std::max() */
const
#else
constexpr
#endif
static
constexpr
size_t
MIN_BUFFER_SIZE
=
std
::
max
(
CHUNK_SIZE
*
32
,
64
*
KILOBYTE
);
...
...
src/command/CommandError.cxx
View file @
86a37d0e
...
...
@@ -29,29 +29,6 @@
#include <assert.h>
#define GLIBCXX_490 20140422
#define GLIBCXX_491 20140716
#define GLIBCXX_492 20141030
#define GLIBCXX_492_Debian_9 20141220
#define GLIBCXX_493 20150626
#define GLIBCXX_494 20160803
#define GLIBCXX_49X_NDK_r13b 20150123
/* the big mess attempts to detect whether we're compiling with
libstdc++ 4.9.x; __GLIBCXX__ is a date tag and cannot be used to
check the major version; and just checking the compiler version
isn't enough, because somebody could use an old libstdc++ with
clang - SIGH! */
#if GCC_OLDER_THAN(5,0) || (defined(__GLIBCXX__) && \
(__GLIBCXX__ == GLIBCXX_490 || __GLIBCXX__ == GLIBCXX_491 || \
__GLIBCXX__ == GLIBCXX_492 || \
__GLIBCXX__ == GLIBCXX_492_Debian_9 || \
__GLIBCXX__ == GLIBCXX_493 || \
__GLIBCXX__ == GLIBCXX_494 || \
__GLIBCXX__ == GLIBCXX_49X_NDK_r13b))
#define GLIBCXX_49X
#endif
gcc_const
static
enum
ack
ToAck
(
PlaylistResult
result
)
noexcept
...
...
@@ -127,19 +104,9 @@ ToAck(std::exception_ptr ep) noexcept
return
ACK_ERROR_ARG
;
}
catch
(
const
std
::
out_of_range
&
e
)
{
return
ACK_ERROR_ARG
;
#ifdef GLIBCXX_49X
}
catch
(
const
std
::
exception
&
e
)
{
#else
}
catch
(...)
{
#endif
try
{
#ifdef GLIBCXX_49X
/* workaround for g++ 4.x: no overload for
rethrow_exception(exception_ptr) */
std
::
rethrow_if_nested
(
e
);
#else
std
::
rethrow_if_nested
(
ep
);
#endif
return
ACK_ERROR_UNKNOWN
;
}
catch
(...)
{
return
ToAck
(
std
::
current_exception
());
...
...
src/pcm/SampleFormat.hxx
View file @
86a37d0e
...
...
@@ -24,7 +24,7 @@
#include <stdint.h>
#if defined(_WIN32)
&& GCC_CHECK_VERSION(4,6)
#if defined(_WIN32)
/* on WIN32, "FLOAT" is already defined, and this triggers -Wshadow */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
...
...
@@ -57,17 +57,14 @@ enum class SampleFormat : uint8_t {
DSD
,
};
#if defined(_WIN32)
&& GCC_CHECK_VERSION(4,6)
#if defined(_WIN32)
#pragma GCC diagnostic pop
#endif
/**
* Checks whether the sample format is valid.
*/
#if !GCC_OLDER_THAN(5,0)
constexpr
#endif
static
inline
bool
constexpr
bool
audio_valid_sample_format
(
SampleFormat
format
)
noexcept
{
switch
(
format
)
{
...
...
@@ -86,10 +83,7 @@ audio_valid_sample_format(SampleFormat format) noexcept
return
false
;
}
#if !GCC_OLDER_THAN(5,0)
constexpr
#endif
static
inline
unsigned
constexpr
unsigned
sample_format_size
(
SampleFormat
format
)
noexcept
{
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