use std chr functions

The ones in std have overloads for const char/char.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-04-30 19:25:55 -07:00
committed by Max Kellermann
parent 99afe8e6d1
commit e4dad42ca1
34 changed files with 71 additions and 77 deletions

View File

@@ -29,11 +29,10 @@
#include "util/Math.hxx"
#include "Log.hxx"
#include <neaacdec.h>
#include <cassert>
#include <cstring>
#include <string.h>
#include <neaacdec.h>
static const unsigned adts_sample_rates[] =
{ 96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050,
@@ -72,8 +71,7 @@ adts_find_frame(DecoderBuffer &buffer)
return 0;
/* find the 0xff marker */
const auto *p = (const uint8_t *)
memchr(data.data, 0xff, data.size);
auto p = (const uint8_t *)std::memchr(data.data, 0xff, data.size);
if (p == nullptr) {
/* no marker - discard the buffer */
buffer.Clear();