Main: omit "constexpr" on MIN_BUFFER_SIZE with GCC 4.x
This commit is contained in:
parent
b3c82f8886
commit
64786ec12a
1
NEWS
1
NEWS
@ -1,6 +1,7 @@
|
|||||||
ver 0.20.8 (not yet released)
|
ver 0.20.8 (not yet released)
|
||||||
* output
|
* output
|
||||||
- osx: fix build failure due to missing "noexcept"
|
- osx: fix build failure due to missing "noexcept"
|
||||||
|
* fix build failure with GCC 4.x
|
||||||
|
|
||||||
ver 0.20.7 (2017/05/15)
|
ver 0.20.7 (2017/05/15)
|
||||||
* database
|
* database
|
||||||
|
10
src/Main.cxx
10
src/Main.cxx
@ -121,7 +121,15 @@ static constexpr size_t KILOBYTE = 1024;
|
|||||||
static constexpr size_t MEGABYTE = 1024 * KILOBYTE;
|
static constexpr size_t MEGABYTE = 1024 * KILOBYTE;
|
||||||
|
|
||||||
static constexpr size_t DEFAULT_BUFFER_SIZE = 4 * MEGABYTE;
|
static constexpr size_t DEFAULT_BUFFER_SIZE = 4 * MEGABYTE;
|
||||||
static constexpr size_t MIN_BUFFER_SIZE = std::max(CHUNK_SIZE * 32,
|
|
||||||
|
static
|
||||||
|
#if GCC_OLDER_THAN(5,0)
|
||||||
|
/* gcc 4.x has no "constexpr" for std::max() */
|
||||||
|
const
|
||||||
|
#else
|
||||||
|
constexpr
|
||||||
|
#endif
|
||||||
|
size_t MIN_BUFFER_SIZE = std::max(CHUNK_SIZE * 32,
|
||||||
64 * KILOBYTE);
|
64 * KILOBYTE);
|
||||||
|
|
||||||
static constexpr unsigned DEFAULT_BUFFER_BEFORE_PLAY = 10;
|
static constexpr unsigned DEFAULT_BUFFER_BEFORE_PLAY = 10;
|
||||||
|
Loading…
Reference in New Issue
Block a user