util/bit_reverse: convert to C++

This commit is contained in:
Max Kellermann 2020-02-05 19:49:18 +01:00
parent b84444b680
commit 7b03f55cb4
6 changed files with 8 additions and 8 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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>

View File

@ -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

View File

@ -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];
} }

View File

@ -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,
) )