Fixed assert strings where string literals are used as booleans.

Review URL: https://webrtc-codereview.appspot.com/473002

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1986 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pwestin@webrtc.org 2012-04-04 14:43:54 +00:00
parent 27fe1b702e
commit ae19720982
8 changed files with 20 additions and 25 deletions

View File

@ -1621,7 +1621,7 @@ VCMJitterBuffer::InsertPacket(VCMEncodedFrame* buffer, const VCMPacket& packet)
}
default:
{
assert(!"JitterBuffer::InsertPacket: Undefined value");
assert(false && "JitterBuffer::InsertPacket: Undefined value");
}
}
return ret;

View File

@ -1045,26 +1045,21 @@ int DirectDrawChannel::DeliverFrame(unsigned char* buffer, int bufferSize,
break;
}
default:
assert(!"DirectDrawChannel::DeliverFrame unknown blitVideoType");
WEBRTC_TRACE(
kTraceError,
kTraceVideo,
-1,
"DirectDrawChannel::DeliverFrame unknown blitVideoType %d",
_blitVideoType);
assert(false &&
"DirectDrawChannel::DeliverFrame unknown blitVideoType");
WEBRTC_TRACE(kTraceError, kTraceVideo, -1,
"%s unknown blitVideoType %d",
__FUNCTION__, _blitVideoType);
}
break;
}
default:
assert(!"DirectDrawChannel::DeliverFrame wrong incomming video type");
WEBRTC_TRACE(
kTraceError,
kTraceVideo,
-1,
"DirectDrawChannel::DeliverFrame wrong incomming %d",
_incomingVideoType);
assert(false &&
"DirectDrawChannel::DeliverFrame wrong incomming video type");
WEBRTC_TRACE(kTraceError, kTraceVideo, -1,
"%s wrong incomming video type:%d",
__FUNCTION__, _incomingVideoType);
}
_offScreenSurfaceUpdated = true;
offScreenSurface->Unlock(NULL);
return 0;

View File

@ -1101,7 +1101,7 @@ void CDXChannelDlg::IncomingRate(const int videoChannel,
void CDXChannelDlg::RequestNewKeyFrame(int channel)
{
assert(!"(RequestNewKeyFrame why is it called");
assert(false && "(RequestNewKeyFrame why is it called");
}
void CDXChannelDlg::PerformanceAlarm(unsigned int cpuLoad)
{

View File

@ -2199,7 +2199,7 @@ WebRtc_Word32 ViEChannel::StopDecodeThread() {
// Couldn't stop the thread, leak instead of crash.
WEBRTC_TRACE(kTraceWarning, kTraceVideo, ViEId(engine_id_, channel_id_),
"%s: could not stop decode thread", __FUNCTION__);
assert(!"could not stop decode thread");
assert(false && "could not stop decode thread");
}
decode_thread_ = NULL;
return 0;

View File

@ -241,7 +241,7 @@ int ViEFilePlayer::StopPlay() {
if (decode_thread_->Stop()) {
delete decode_thread_;
} else {
assert(!"ViEFilePlayer::StopPlay() Failed to stop decode thread");
assert(false && "ViEFilePlayer::StopPlay() Failed to stop decode thread");
WEBRTC_TRACE(kTraceError, kTraceVideo, ViEId(engine_id_, id_),
"ViEFilePlayer::StartPlay() Failed to stop file decode "
"thread.");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
@ -98,7 +98,7 @@ int ViEFileRecorder::StartRecording(const char* file_nameUTF8,
audio_channel, this, &engine_audio_codec_inst);
break;
default:
assert(!"Unknown audio_source");
assert(false && "Unknown audio_source");
}
if (error != 0) {
WEBRTC_TRACE(kTraceError, kTraceVideo, instance_id_,
@ -130,7 +130,7 @@ int ViEFileRecorder::StopRecording() {
case NO_AUDIO:
break;
default:
assert(!"Unknown audio_source");
assert(false && "Unknown audio_source");
}
if (error != 0) {
WEBRTC_TRACE(kTraceError, kTraceVideo, instance_id_,

View File

@ -141,7 +141,7 @@ int ViEFrameProviderBase::RegisterFrameCallback(
WEBRTC_TRACE(kTraceWarning, kTraceVideo, ViEId(engine_id_, id_),
"%s 0x%p already registered", __FUNCTION__,
callback_object);
assert("!frameObserver already registered");
assert(false && "frameObserver already registered");
return -1;
}
frame_callbacks_.push_back(callback_object);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
@ -52,7 +52,7 @@ VideoEngine* VideoEngine::Create() {
VideoEngine* self = pfn();
return self;
} else {
assert(!"Failed to open test dll VideoEngineTestingDLL.dll");
assert(false && "Failed to open test dll VideoEngineTestingDLL.dll");
return NULL;
}
}