зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1394656 - Don't include nsAlgorithm.h in AudioSampleFormat.h. r=jwwang
There's nothing in nsAlgorithm.h that we're using in AudioSampleFormat.h, though it does pull in the definition of NS_ASSERTION(), which we can replace with an MFBT assertion to simplyfy the include graph. MozReview-Commit-ID: EXOv2t0hKDc --HG-- extra : rebase_source : 466afc8922dbe9c209a07073c4946c8b568fd2c1
This commit is contained in:
Родитель
90d0fcbc14
Коммит
f15f9218c7
|
@ -6,7 +6,7 @@
|
|||
#ifndef MOZILLA_AUDIOSAMPLEFORMAT_H_
|
||||
#define MOZILLA_AUDIOSAMPLEFORMAT_H_
|
||||
|
||||
#include "nsAlgorithm.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -248,8 +248,7 @@ AddAudioSampleOffset(const void* aBase, AudioSampleFormat aFormat,
|
|||
{
|
||||
static_assert(AUDIO_FORMAT_S16 == 0, "Bad constant");
|
||||
static_assert(AUDIO_FORMAT_FLOAT32 == 1, "Bad constant");
|
||||
NS_ASSERTION(aFormat == AUDIO_FORMAT_S16 || aFormat == AUDIO_FORMAT_FLOAT32,
|
||||
"Unknown format");
|
||||
MOZ_ASSERT(aFormat == AUDIO_FORMAT_S16 || aFormat == AUDIO_FORMAT_FLOAT32);
|
||||
|
||||
return static_cast<const uint8_t*>(aBase) + (aFormat + 1)*2*aOffset;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче