util/bit_reverse: convert to C++
This commit is contained in:
parent
b84444b680
commit
7b03f55cb4
|
@ -31,7 +31,7 @@
|
||||||
#include "../DecoderAPI.hxx"
|
#include "../DecoderAPI.hxx"
|
||||||
#include "input/InputStream.hxx"
|
#include "input/InputStream.hxx"
|
||||||
#include "pcm/CheckAudioFormat.hxx"
|
#include "pcm/CheckAudioFormat.hxx"
|
||||||
#include "util/bit_reverse.h"
|
#include "util/BitReverse.hxx"
|
||||||
#include "util/ByteOrder.hxx"
|
#include "util/ByteOrder.hxx"
|
||||||
#include "util/StringView.hxx"
|
#include "util/StringView.hxx"
|
||||||
#include "tag/Handler.hxx"
|
#include "tag/Handler.hxx"
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include "../DecoderAPI.hxx"
|
#include "../DecoderAPI.hxx"
|
||||||
#include "input/InputStream.hxx"
|
#include "input/InputStream.hxx"
|
||||||
#include "pcm/CheckAudioFormat.hxx"
|
#include "pcm/CheckAudioFormat.hxx"
|
||||||
#include "util/bit_reverse.h"
|
#include "util/BitReverse.hxx"
|
||||||
#include "util/ByteOrder.hxx"
|
#include "util/ByteOrder.hxx"
|
||||||
#include "DsdLib.hxx"
|
#include "DsdLib.hxx"
|
||||||
#include "tag/Handler.hxx"
|
#include "tag/Handler.hxx"
|
||||||
|
|
|
@ -32,7 +32,7 @@ or implied, of Sebastian Gesemann.
|
||||||
|
|
||||||
#include "Dsd2Pcm.hxx"
|
#include "Dsd2Pcm.hxx"
|
||||||
#include "Traits.hxx"
|
#include "Traits.hxx"
|
||||||
#include "util/bit_reverse.h"
|
#include "util/BitReverse.hxx"
|
||||||
#include "util/GenerateArray.hxx"
|
#include "util/GenerateArray.hxx"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "bit_reverse.h"
|
#include "BitReverse.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see http://graphics.stanford.edu/~seander/bithacks.html#BitReverseTable
|
* @see http://graphics.stanford.edu/~seander/bithacks.html#BitReverseTable
|
|
@ -17,8 +17,8 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MPD_BIT_REVERSE_H
|
#ifndef MPD_BIT_REVERSE_HXX
|
||||||
#define MPD_BIT_REVERSE_H
|
#define MPD_BIT_REVERSE_HXX
|
||||||
|
|
||||||
#include "Compiler.h"
|
#include "Compiler.h"
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ extern const uint8_t bit_reverse_table[256];
|
||||||
|
|
||||||
gcc_const
|
gcc_const
|
||||||
static inline uint8_t
|
static inline uint8_t
|
||||||
bit_reverse(uint8_t x)
|
bit_reverse(uint8_t x) noexcept
|
||||||
{
|
{
|
||||||
return bit_reverse_table[x];
|
return bit_reverse_table[x];
|
||||||
}
|
}
|
|
@ -29,7 +29,7 @@ util = static_library(
|
||||||
'OptionParser.cxx',
|
'OptionParser.cxx',
|
||||||
'ByteReverse.cxx',
|
'ByteReverse.cxx',
|
||||||
'format.c',
|
'format.c',
|
||||||
'bit_reverse.c',
|
'BitReverse.cxx',
|
||||||
include_directories: inc,
|
include_directories: inc,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue