From eb1ee3240ed89af78d6cbfc736a6873128fe493d Mon Sep 17 00:00:00 2001 From: Marcus Overhagen Date: Wed, 29 Jun 2005 22:12:31 +0000 Subject: [PATCH] made a few things const git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13355 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp | 6 +++--- src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp b/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp index 204cb236b0..52594bfe7d 100644 --- a/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp +++ b/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp @@ -297,7 +297,7 @@ mp3Decoder::DecodeNextChunk() } bool -mp3Decoder::IsValidStream(uint8 *buffer, int size) +mp3Decoder::IsValidStream(const uint8 *buffer, int size) { // check 3 consecutive frame headers to make sure // that the length encoded in the header is correct, @@ -325,9 +325,9 @@ mp3Decoder::IsValidStream(uint8 *buffer, int size) } int -mp3Decoder::GetFrameLength(void *header) +mp3Decoder::GetFrameLength(const void *header) { - uint8 *h = (uint8 *)header; + const uint8 *h = static_cast(header); if (h[0] != 0xff) return -1; diff --git a/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.h b/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.h index 3537d3580e..59bdd74d52 100644 --- a/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.h +++ b/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.h @@ -51,8 +51,8 @@ public: private: status_t DecodeNextChunk(); - bool IsValidStream(uint8 *buffer, int size); - int GetFrameLength(void *header); + bool IsValidStream(const uint8 *buffer, int size); + int GetFrameLength(const void *header); private: struct mpstr fMpgLibPrivate;