diff options
Diffstat (limited to '')
-rw-r--r-- | src/decoder/PcmDecoderPlugin.cxx | 5 | ||||
-rw-r--r-- | src/pcm/PcmExport.cxx | 5 | ||||
-rw-r--r-- | src/util/ByteReverse.cxx (renamed from src/util/byte_reverse.c) | 24 | ||||
-rw-r--r-- | src/util/ByteReverse.hxx (renamed from src/util/byte_reverse.h) | 6 |
4 files changed, 17 insertions, 23 deletions
diff --git a/src/decoder/PcmDecoderPlugin.cxx b/src/decoder/PcmDecoderPlugin.cxx index 6996b583a..61062f7f9 100644 --- a/src/decoder/PcmDecoderPlugin.cxx +++ b/src/decoder/PcmDecoderPlugin.cxx @@ -22,12 +22,9 @@ #include "DecoderAPI.hxx" #include "InputStream.hxx" #include "util/Error.hxx" +#include "util/ByteReverse.hxx" #include "Log.hxx" -extern "C" { -#include "util/byte_reverse.h" -} - #include <glib.h> #include <unistd.h> #include <string.h> diff --git a/src/pcm/PcmExport.cxx b/src/pcm/PcmExport.cxx index 389670b6f..74b642569 100644 --- a/src/pcm/PcmExport.cxx +++ b/src/pcm/PcmExport.cxx @@ -21,10 +21,7 @@ #include "PcmExport.hxx" #include "PcmDsdUsb.hxx" #include "PcmPack.hxx" - -extern "C" { -#include "util/byte_reverse.h" -} +#include "util/ByteReverse.hxx" void PcmExport::Open(SampleFormat sample_format, unsigned _channels, diff --git a/src/util/byte_reverse.c b/src/util/ByteReverse.cxx index e96af14b9..e5367b34c 100644 --- a/src/util/byte_reverse.c +++ b/src/util/ByteReverse.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2012 The Music Player Daemon Project + * Copyright (C) 2003-2013 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "byte_reverse.h" +#include "ByteReverse.hxx" #include <glib.h> #include <assert.h> @@ -25,8 +25,8 @@ void reverse_bytes_16(uint16_t *dest, const uint16_t *src, const uint16_t *src_end) { - assert(dest != NULL); - assert(src != NULL); + assert(dest != nullptr); + assert(src != nullptr); assert(src_end >= src); while (src < src_end) { @@ -38,8 +38,8 @@ reverse_bytes_16(uint16_t *dest, const uint16_t *src, const uint16_t *src_end) void reverse_bytes_32(uint32_t *dest, const uint32_t *src, const uint32_t *src_end) { - assert(dest != NULL); - assert(src != NULL); + assert(dest != nullptr); + assert(src != nullptr); assert(src_end >= src); while (src < src_end) { @@ -51,8 +51,8 @@ reverse_bytes_32(uint32_t *dest, const uint32_t *src, const uint32_t *src_end) void reverse_bytes_64(uint64_t *dest, const uint64_t *src, const uint64_t *src_end) { - assert(dest != NULL); - assert(src != NULL); + assert(dest != nullptr); + assert(src != nullptr); assert(src_end >= src); while (src < src_end) { @@ -75,8 +75,8 @@ reverse_bytes_generic(uint8_t *dest, const uint8_t *src, const uint8_t *src_end, size_t frame_size) { - assert(dest != NULL); - assert(src != NULL); + assert(dest != nullptr); + assert(src != nullptr); assert(src_end >= src); assert(frame_size > 0); assert((src_end - src) % frame_size == 0); @@ -92,8 +92,8 @@ void reverse_bytes(uint8_t *dest, const uint8_t *src, const uint8_t *src_end, size_t frame_size) { - assert(dest != NULL); - assert(src != NULL); + assert(dest != nullptr); + assert(src != nullptr); assert(src_end >= src); assert(frame_size > 0); assert((src_end - src) % frame_size == 0); diff --git a/src/util/byte_reverse.h b/src/util/ByteReverse.hxx index 63213d6c2..d6380213a 100644 --- a/src/util/byte_reverse.h +++ b/src/util/ByteReverse.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2012 The Music Player Daemon Project + * Copyright (C) 2003-2013 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -17,8 +17,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef MPD_BYTE_REVERSE_H -#define MPD_BYTE_REVERSE_H +#ifndef MPD_BYTE_REVERSE_HXX +#define MPD_BYTE_REVERSE_HXX #include <stdint.h> #include <stddef.h> |