mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 09:15:38 +00:00
Fix -Wduplicated-branches warnings
This commit is contained in:
parent
c79c14da91
commit
f1dbd9b959
4 changed files with 16 additions and 16 deletions
|
@ -608,8 +608,8 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
|||
endif ()
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.6 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.6)
|
||||
set(OPENMW_CXX_FLAGS "${OPENMW_CXX_FLAGS} -Wno-unused-but-set-parameter")
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU)
|
||||
set(OPENMW_CXX_FLAGS "${OPENMW_CXX_FLAGS} -Wno-unused-but-set-parameter -Wduplicated-branches")
|
||||
endif()
|
||||
endif (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||
|
||||
|
|
|
@ -248,12 +248,11 @@ namespace MWSound
|
|||
|
||||
mFrame = av_frame_alloc();
|
||||
|
||||
if (mCodecCtx->sample_fmt == AV_SAMPLE_FMT_FLT || mCodecCtx->sample_fmt == AV_SAMPLE_FMT_FLTP)
|
||||
mOutputSampleFormat = AV_SAMPLE_FMT_S16; // FIXME: Check for AL_EXT_FLOAT32 support
|
||||
else if (mCodecCtx->sample_fmt == AV_SAMPLE_FMT_U8P)
|
||||
if (mCodecCtx->sample_fmt == AV_SAMPLE_FMT_U8P)
|
||||
mOutputSampleFormat = AV_SAMPLE_FMT_U8;
|
||||
else if (mCodecCtx->sample_fmt == AV_SAMPLE_FMT_S16P)
|
||||
mOutputSampleFormat = AV_SAMPLE_FMT_S16;
|
||||
// FIXME: Check for AL_EXT_FLOAT32 support
|
||||
// else if (mCodecCtx->sample_fmt == AV_SAMPLE_FMT_FLT || mCodecCtx->sample_fmt == AV_SAMPLE_FMT_FLTP)
|
||||
// mOutputSampleFormat = AV_SAMPLE_FMT_S16;
|
||||
else
|
||||
mOutputSampleFormat = AV_SAMPLE_FMT_S16;
|
||||
|
||||
|
|
|
@ -64,10 +64,11 @@ namespace MWSound
|
|||
{
|
||||
if (sampleFormat == AV_SAMPLE_FMT_U8P || sampleFormat == AV_SAMPLE_FMT_U8)
|
||||
sampleFormat = AV_SAMPLE_FMT_U8;
|
||||
else if (sampleFormat == AV_SAMPLE_FMT_S16P || sampleFormat == AV_SAMPLE_FMT_S16)
|
||||
sampleFormat = AV_SAMPLE_FMT_S16;
|
||||
else if (sampleFormat == AV_SAMPLE_FMT_FLTP || sampleFormat == AV_SAMPLE_FMT_FLT)
|
||||
sampleFormat = AV_SAMPLE_FMT_S16; // FIXME: check for AL_EXT_FLOAT32 support
|
||||
// else if (sampleFormat == AV_SAMPLE_FMT_S16P || sampleFormat == AV_SAMPLE_FMT_S16)
|
||||
// sampleFormat = AV_SAMPLE_FMT_S16;
|
||||
// FIXME: check for AL_EXT_FLOAT32 support
|
||||
// else if (sampleFormat == AV_SAMPLE_FMT_FLTP || sampleFormat == AV_SAMPLE_FMT_FLT)
|
||||
// sampleFormat = AV_SAMPLE_FMT_S16;
|
||||
else
|
||||
sampleFormat = AV_SAMPLE_FMT_S16;
|
||||
|
||||
|
|
|
@ -344,11 +344,11 @@ void ESM4::Race::load(ESM4::Reader& reader)
|
|||
|
||||
// TES5 seems to have no body parts at all, instead keep EGT models
|
||||
}
|
||||
else if (curr_part == 2) // egt
|
||||
{
|
||||
// std::cout << mEditorId << " egt " << currentIndex << std::endl; // FIXME
|
||||
reader.skipSubRecordData(); // FIXME TES5 egt
|
||||
}
|
||||
// else if (curr_part == 2) // egt
|
||||
// {
|
||||
// // std::cout << mEditorId << " egt " << currentIndex << std::endl; // FIXME
|
||||
// reader.skipSubRecordData(); // FIXME TES5 egt
|
||||
// }
|
||||
else
|
||||
{
|
||||
// std::cout << mEditorId << " hkx " << currentIndex << std::endl; // FIXME
|
||||
|
|
Loading…
Reference in a new issue