Index: libs/libmythtv/dvbrecorder.cpp =================================================================== --- libs/libmythtv/dvbrecorder.cpp (revision 13705) +++ libs/libmythtv/dvbrecorder.cpp (working copy) @@ -142,32 +142,20 @@ if (IsOpen()) Close(); - if (_buffer) - { - delete[] _buffer; - _buffer = NULL; - } + delete[] _buffer; + _buffer = NULL; - if (_drb) - { - delete _drb; - _drb = NULL; - } + delete _drb; + _drb = NULL; SetOutputPAT(NULL); SetOutputPMT(NULL); - if (_input_pat) - { - delete _input_pat; - _input_pat = NULL; - } + delete _input_pat; + _input_pat = NULL; - if (_input_pmt) - { - delete _input_pmt; - _input_pmt = NULL; - } + delete _input_pmt; + _input_pmt = NULL; } void DVBRecorder::SetOption(const QString &name, int value) @@ -307,8 +295,7 @@ MPEGStreamData *old_data = _stream_data; _stream_data = data; - if (old_data) - delete old_data; + delete old_data; if (data) { @@ -837,8 +824,7 @@ ProgramAssociationTable *old_pat = _pat; _pat = new_pat; - if (old_pat) - delete old_pat; + delete old_pat; if (_pat) VERBOSE(VB_RECORD, LOC + "SetOutputPAT()\n" + _pat->toString()); @@ -852,8 +838,7 @@ ProgramMapTable *old_pmt = _pmt; _pmt = new_pmt; - if (old_pmt) - delete old_pmt; + delete old_pmt; if (_pmt) VERBOSE(VB_RECORD, LOC + "SetOutputPMT()\n" + _pmt->toString()); Index: libs/libmythtv/nuppeldecoder.cpp =================================================================== --- libs/libmythtv/nuppeldecoder.cpp (revision 13705) +++ libs/libmythtv/nuppeldecoder.cpp (working copy) @@ -80,18 +80,12 @@ NuppelDecoder::~NuppelDecoder() { - if (rtjd) - delete rtjd; - if (ffmpeg_extradata) - delete [] ffmpeg_extradata; - if (buf) - delete [] buf; - if (buf2) - delete [] buf2; - if (strm) - delete [] strm; - if (audioSamples) - delete [] audioSamples; + delete rtjd; + delete [] ffmpeg_extradata; + delete [] buf; + delete [] buf2; + delete [] strm; + delete [] audioSamples; while(! StoredData.isEmpty()) { delete StoredData.first(); StoredData.removeFirst(); Index: libs/libmythtv/NuppelVideoPlayer.cpp =================================================================== --- libs/libmythtv/NuppelVideoPlayer.cpp (revision 13705) +++ libs/libmythtv/NuppelVideoPlayer.cpp (working copy) @@ -294,8 +294,7 @@ NuppelVideoPlayer::~NuppelVideoPlayer(void) { - if (audioOutput) - delete audioOutput; + delete audioOutput; if (m_playbackinfo) { @@ -303,46 +302,31 @@ delete m_playbackinfo; } - if (weMadeBuffer) - delete ringBuffer; + delete ringBuffer; if (osdHasSubtitles || !nonDisplayedAVSubtitles.empty()) ClearSubtitles(); - if (osd) - delete osd; + delete osd; for (int i = 0; i < MAXTBUFFER; i++) - { - if (txtbuffers[i].buffer) - delete [] txtbuffers[i].buffer; - } + delete [] txtbuffers[i].buffer; SetDecoder(NULL); - if (interactiveTV) - delete interactiveTV; + delete interactiveTV; - if (FiltMan) - delete FiltMan; + delete FiltMan; - if (videoFilters) - delete videoFilters; + delete videoFilters; - if (videosync) - delete videosync; + delete videosync; - if (videoOutput) - delete videoOutput; + delete videoOutput; - if (argb_buf) - { - delete [] argb_buf; - argb_buf = NULL; - } + delete [] argb_buf; - if (output_jmeter) - delete output_jmeter; + delete output_jmeter; ShutdownYUVResize(); } @@ -678,11 +662,8 @@ .arg(audio_bits).arg(audio_channels).arg(audio_samplerate)); no_audio_in = no_audio_out = true; - if (audioOutput) - { - delete audioOutput; - audioOutput = NULL; - } + delete audioOutput; + audioOutput = NULL; return errMsg; } @@ -706,11 +687,8 @@ { VERBOSE(VB_IMPORTANT, LOC + "Disabling Audio" + QString(", reason is: %1").arg(errMsg)); - if (audioOutput) - { - delete audioOutput; - audioOutput = NULL; - } + delete audioOutput; + audioOutput = NULL; no_audio_out = true; } else if (no_audio_out) @@ -1108,8 +1086,7 @@ videofiltersLock.lock(); - if (videoFilters) - delete videoFilters; + delete videoFilters; postfilt_width = video_width; postfilt_height = video_height; @@ -1373,11 +1350,8 @@ void NuppelVideoPlayer::ShutdownYUVResize(void) { - if (yuv_frame_scaled) - { - delete [] yuv_frame_scaled; - yuv_frame_scaled = NULL; - } + delete [] yuv_frame_scaled; + yuv_frame_scaled = NULL; if (yuv_scaler) { @@ -1433,8 +1407,7 @@ if (argb_size != size) { - if (argb_buf) - delete [] argb_buf; + delete [] argb_buf; argb_buf = new unsigned char[(size.width() * size.height() * 4) + 128]; argb_size = QSize(size.width(), size.height()); } Index: libs/libmythtv/RTjpegN.cpp =================================================================== --- libs/libmythtv/RTjpegN.cpp (revision 13705) +++ libs/libmythtv/RTjpegN.cpp (working copy) @@ -2821,8 +2821,7 @@ RTjpeg::~RTjpeg(void) { - if (old_start) - delete [] old_start; + delete [] old_start; } inline int RTjpeg::compressYUV420(int8_t *sp, uint8_t **planes) Index: libs/libmythtv/NuppelVideoRecorder.cpp =================================================================== --- libs/libmythtv/NuppelVideoRecorder.cpp (revision 13705) +++ libs/libmythtv/NuppelVideoRecorder.cpp (working copy) @@ -176,19 +176,13 @@ NuppelVideoRecorder::~NuppelVideoRecorder(void) { - if (weMadeBuffer && ringBuffer) - { - delete ringBuffer; - ringBuffer = NULL; - } - if (rtjc) - delete rtjc; - if (mp3buf) - delete [] mp3buf; + delete ringBuffer; + ringBuffer = NULL; + delete rtjc; + delete [] mp3buf; if (gf) lame_close(gf); - if (strm) - delete [] strm; + delete [] strm; if (fd >= 0) close(fd); if (seektable) @@ -229,12 +223,9 @@ av_free(mpa_vidctx); mpa_vidctx = NULL; - if (videoFilters) - delete videoFilters; - if (FiltMan) - delete FiltMan; - if (ccd) - delete ccd; + delete videoFilters; + delete FiltMan; + delete ccd; } void NuppelVideoRecorder::SetOption(const QString &opt, int value) @@ -815,8 +806,7 @@ void NuppelVideoRecorder::InitFilters(void) { int btmp; - if (videoFilters) - delete videoFilters; + delete videoFilters; QString tmpVideoFilterList; Index: libs/libmythtv/hdtvrecorder.cpp =================================================================== --- libs/libmythtv/hdtvrecorder.cpp (revision 13705) +++ libs/libmythtv/hdtvrecorder.cpp (working copy) @@ -214,8 +214,7 @@ ATSCStreamData *old_data = _atsc_stream_data; _atsc_stream_data = data; - if (old_data) - delete old_data; + delete old_data; if (data) { Index: libs/libmythtv/videoout_quartz.cpp =================================================================== --- libs/libmythtv/videoout_quartz.cpp (revision 13705) +++ libs/libmythtv/videoout_quartz.cpp (working copy) @@ -1426,8 +1426,7 @@ vbuffers.CreateBuffers(video_dim.width(), video_dim.height()); // Set up pause frame - if (pauseFrame.buf) - delete [] pauseFrame.buf; + delete [] pauseFrame.buf; VideoFrame *scratch = vbuffers.GetScratchFrame(); Index: libs/libmythtv/avformatdecoder.cpp =================================================================== --- libs/libmythtv/avformatdecoder.cpp (revision 13705) +++ libs/libmythtv/avformatdecoder.cpp (working copy) @@ -333,11 +333,9 @@ delete ttd; delete d; delete h264_kf_seq; - if (audioSamples) - delete [] audioSamples; + delete [] audioSamples; - if (avfRingBuffer) - delete avfRingBuffer; + delete avfRingBuffer; } void AvFormatDecoder::CloseCodecs() @@ -699,8 +697,7 @@ ringBuffer = rbuffer; - if (avfRingBuffer) - delete avfRingBuffer; + delete avfRingBuffer; avfRingBuffer = new AVFRingBuffer(rbuffer); AVInputFormat *fmt = NULL; @@ -2825,8 +2822,7 @@ { ateof = true; GetNVP()->SetEof(); - if (pkt) - delete pkt; + delete pkt; return false; } @@ -3418,8 +3414,7 @@ av_free_packet(pkt); } - if (pkt) - delete pkt; + delete pkt; return true; } Index: libs/libmythtv/osdtypes.cpp =================================================================== --- libs/libmythtv/osdtypes.cpp (revision 13705) +++ libs/libmythtv/osdtypes.cpp (working copy) @@ -155,8 +155,7 @@ for (; i != allTypes->end(); i++) { OSDType *type = (*i); - if (type) - delete type; + delete type; } allTypes->clear(); } @@ -1222,10 +1221,8 @@ else { // non-cached - if (m_yuv) - delete [] m_yuv; - if (m_alpha) - delete [] m_alpha; + delete [] m_yuv; + delete [] m_alpha; } } @@ -1266,11 +1263,9 @@ } else if (!m_cacheitem || !usecache) { - if (m_yuv) - delete [] m_yuv; + delete [] m_yuv; m_yuv = NULL; - if (m_alpha) - delete [] m_alpha; + delete [] m_alpha; m_alpha = NULL; } @@ -1372,11 +1367,9 @@ if (!m_cacheitem) { - if (m_yuv) - delete [] m_yuv; + delete [] m_yuv; m_yuv = NULL; - if (m_alpha) - delete [] m_alpha; + delete [] m_alpha; m_alpha = NULL; m_isvalid = false; } @@ -2241,8 +2234,7 @@ for (; i != m_textlist->end(); i++) { ccText *cc = (*i); - if (cc) - delete cc; + delete cc; } delete m_textlist; m_textlist = NULL; Index: libs/libmythtv/ThreadedFileWriter.cpp =================================================================== --- libs/libmythtv/ThreadedFileWriter.cpp (revision 13705) +++ libs/libmythtv/ThreadedFileWriter.cpp (working copy) @@ -176,11 +176,7 @@ fd = -1; } - if (buf) - { - delete [] buf; - buf = NULL; - } + delete [] buf; } /** \fn ThreadedFileWriter::Write(const void*, uint) Index: libs/libmythtv/recorderbase.cpp =================================================================== --- libs/libmythtv/recorderbase.cpp (revision 13705) +++ libs/libmythtv/recorderbase.cpp (working copy) @@ -31,11 +31,7 @@ delete ringBuffer; ringBuffer = NULL; } - if (curRecording) - { - delete curRecording; - curRecording = NULL; - } + delete curRecording; } void RecorderBase::SetRingBuffer(RingBuffer *rbuf) @@ -65,8 +61,7 @@ else curRecording = NULL; - if (oldrec) - delete oldrec; + delete oldrec; } void RecorderBase::SetOption(const QString &name, const QString &value) @@ -209,8 +204,7 @@ ProgramInfo *oldrec = curRecording; curRecording = nextRecording; nextRecording = NULL; - if (oldrec) - delete oldrec; + delete oldrec; rb_changed = true; StartNewFile(); Index: libs/libmythtv/guidegrid.cpp =================================================================== --- libs/libmythtv/guidegrid.cpp (revision 13705) +++ libs/libmythtv/guidegrid.cpp (working copy) @@ -285,29 +285,20 @@ gContext->removeListener(this); for (int x = 0; x < MAX_DISPLAY_TIMES; x++) { - if (m_timeInfos[x]) - { - delete m_timeInfos[x]; - m_timeInfos[x] = NULL; - } + delete m_timeInfos[x]; + m_timeInfos[x] = NULL; } for (int y = 0; y < MAX_DISPLAY_CHANS; y++) { - if (m_programs[y]) - { - delete m_programs[y]; - m_programs[y] = NULL; - } + delete m_programs[y]; + m_programs[y] = NULL; } m_channelInfos.clear(); - if (theme) - { - delete theme; - theme = NULL; - } + delete theme; + theme = NULL; if (jumpToChannelTimer) { @@ -663,8 +654,7 @@ { for (int x = 0; x < DISPLAY_TIMES; x++) { - if (m_timeInfos[x]) - delete m_timeInfos[x]; + delete m_timeInfos[x]; m_timeInfos[x] = NULL; } @@ -743,8 +733,7 @@ ProgramInfo *program; ProgramInfo *proginfo = NULL; - if (m_programs[row]) - delete m_programs[row]; + delete m_programs[row]; m_programs[row] = NULL; for (int x = 0; x < DISPLAY_TIMES; x++) Index: libs/libmythtv/darwinfirewiredevice.cpp =================================================================== --- libs/libmythtv/darwinfirewiredevice.cpp (revision 13705) +++ libs/libmythtv/darwinfirewiredevice.cpp (working copy) @@ -84,11 +84,7 @@ delete (*it); devices.clear(); - if (logger) - { - delete logger; - logger = NULL; - } + delete logger; } pthread_t controller_thread; @@ -128,11 +124,7 @@ ClosePort(); } - if (m_priv) - { - delete m_priv; - m_priv = NULL; - } + delete m_priv; } void DarwinFirewireDevice::RunController(void) Index: libs/libmythtv/hdhrrecorder.cpp =================================================================== --- libs/libmythtv/hdhrrecorder.cpp (revision 13705) +++ libs/libmythtv/hdhrrecorder.cpp (working copy) @@ -52,23 +52,14 @@ { StopRecording(); Close(); - if (_stream_data) - { - delete _stream_data; - _stream_data = NULL; - } + delete _stream_data; + _stream_data = NULL; - if (_input_pat) - { - delete _input_pat; - _input_pat = NULL; - } + delete _input_pat; + _input_pat = NULL; - if (_input_pmt) - { - delete _input_pmt; - _input_pmt = NULL; - } + delete _input_pmt; + _input_pmt = NULL; } void HDHRRecorder::SetOptionsFromProfile(RecordingProfile *profile, @@ -158,8 +149,7 @@ MPEGStreamData *old_data = _stream_data; _stream_data = data; - if (old_data) - delete old_data; + delete old_data; if (data) { Index: libs/libmythtv/scanwizardscanner.cpp =================================================================== --- libs/libmythtv/scanwizardscanner.cpp (revision 13705) +++ libs/libmythtv/scanwizardscanner.cpp (working copy) @@ -110,17 +110,11 @@ void ScanWizardScanner::Teardown() { // Join the thread and close the channel - if (scanner) - { - delete scanner; // TODO we should use deleteLater... - scanner = NULL; - } + delete scanner; // TODO we should use deleteLater... + scanner = NULL; - if (channel) - { - delete channel; - channel = NULL; - } + delete channel; + channel = NULL; #ifdef USING_IPTV if (freeboxScanner) @@ -131,11 +125,8 @@ } #endif - if (popupProgress) - { - delete popupProgress; // TODO we should use deleteLater... - popupProgress = NULL; - } + delete popupProgress; // TODO we should use deleteLater... + popupProgress = NULL; } void ScanWizardScanner::customEvent(QCustomEvent *e) Index: libs/libmythtv/eithelper.cpp =================================================================== --- libs/libmythtv/eithelper.cpp (revision 13705) +++ libs/libmythtv/eithelper.cpp (working copy) @@ -195,8 +195,7 @@ atsc_major, atsc_minor, *it, ett->ExtendedTextMessage().GetBestMatch(languagePreferences)); - if ((*it).desc) - delete [] (*it).desc; + delete [] (*it).desc; (*eits_it).erase(it); Index: libs/libmythtv/videoout_directfb.cpp =================================================================== --- libs/libmythtv/videoout_directfb.cpp (revision 13705) +++ libs/libmythtv/videoout_directfb.cpp (working copy) @@ -287,11 +287,7 @@ XJ_started = false; } - if (data) - { - delete data; - data = NULL; - } + delete data; } int VideoOutputDirectfb::GetRefreshRate(void) @@ -675,11 +671,8 @@ CreateDirectfbBuffers(desc); MoveResize(); - if (pauseFrame.buf) - { - delete [] pauseFrame.buf; - pauseFrame.buf = NULL; - } + delete [] pauseFrame.buf; + pauseFrame.buf = NULL; init(&pauseFrame, vbuffers.GetScratchFrame()->codec, new unsigned char[vbuffers.GetScratchFrame()->size + 64], Index: libs/libmythtv/firewirerecorder.cpp =================================================================== --- libs/libmythtv/firewirerecorder.cpp (revision 13705) +++ libs/libmythtv/firewirerecorder.cpp (working copy) @@ -196,8 +196,7 @@ MPEGStreamData *old_data = _mpeg_stream_data; _mpeg_stream_data = data; - if (old_data) - delete old_data; + delete old_data; if (data) { Index: libs/libmythtv/siscan.cpp =================================================================== --- libs/libmythtv/siscan.cpp (revision 13705) +++ libs/libmythtv/siscan.cpp (working copy) @@ -136,8 +136,7 @@ { StopScanner(); VERBOSE(VB_SIPARSER, LOC + "SIScanner Stopped"); - if (signalMonitor) - delete signalMonitor; + delete signalMonitor; } void SIScan::SetAnalog(bool is_analog) @@ -1521,8 +1520,7 @@ .arg(service_name)); } - if (desc) - delete desc; + delete desc; } } Index: libs/libmythtv/dbox2recorder.cpp =================================================================== --- libs/libmythtv/dbox2recorder.cpp (revision 13705) +++ libs/libmythtv/dbox2recorder.cpp (working copy) @@ -148,11 +148,8 @@ Close(); - if (transportStream.buffer) - { - delete [] transportStream.buffer; - transportStream.buffer = NULL; - } + delete [] transportStream.buffer; + transportStream.buffer = NULL; if (http) { Index: libs/libmythtv/cc708window.cpp =================================================================== --- libs/libmythtv/cc708window.cpp (revision 13705) +++ libs/libmythtv/cc708window.cpp (working copy) @@ -184,11 +184,7 @@ true_row_count = 0; true_column_count = 0; - if (text) - { - delete [] text; - text = NULL; - } + delete [] text; } void CC708Window::Clear(void) Index: libs/libmythtv/xvmctextures.cpp =================================================================== --- libs/libmythtv/xvmctextures.cpp (revision 13705) +++ libs/libmythtv/xvmctextures.cpp (working copy) @@ -43,8 +43,7 @@ return tmp; } - if (tmp) - delete tmp; + delete tmp; return NULL; } @@ -158,8 +157,7 @@ if (sz > gl_osd_tmp_buf_size) { pixels = new unsigned char[sz + 256]; - if (gl_osd_tmp_buf) - delete [] gl_osd_tmp_buf; + delete [] gl_osd_tmp_buf; gl_osd_tmp_buf = pixels; gl_osd_tmp_buf_size = sz; } Index: libs/libmythtv/iptvrecorder.cpp =================================================================== --- libs/libmythtv/iptvrecorder.cpp (revision 13705) +++ libs/libmythtv/iptvrecorder.cpp (working copy) @@ -251,8 +251,7 @@ MPEGStreamData *old_data = _stream_data; _stream_data = data; - if (old_data) - delete old_data; + delete old_data; if (data) data->AddMPEGSPListener(this); Index: libs/libmythtv/cc608decoder.cpp =================================================================== --- libs/libmythtv/cc608decoder.cpp (revision 13705) +++ libs/libmythtv/cc608decoder.cpp (working copy) @@ -81,8 +81,7 @@ CC608Decoder::~CC608Decoder(void) { - if (rbuf) - delete [] rbuf; + delete [] rbuf; } void CC608Decoder::FormatCC(int tc, int code1, int code2) Index: libs/libmythtv/RingBuffer.cpp =================================================================== --- libs/libmythtv/RingBuffer.cpp (revision 13705) +++ libs/libmythtv/RingBuffer.cpp (working copy) @@ -153,10 +153,7 @@ filename = lfilename; - if (remotefile) - { - delete remotefile; - } + delete remotefile; if (fd2 >= 0) { @@ -312,16 +309,9 @@ pthread_rwlock_wrlock(&rwlock); - if (remotefile) - { - delete remotefile; - } + delete remotefile; - if (tfw) - { - delete tfw; - tfw = NULL; - } + delete tfw; if (fd2 >= 0) { @@ -330,10 +320,7 @@ } #ifdef USING_FRONTEND - if (dvdPriv) - { - delete dvdPriv; - } + delete dvdPriv; #endif // USING_FRONTEND } Index: libs/libmythtv/tv_play.cpp =================================================================== --- libs/libmythtv/tv_play.cpp (revision 13705) +++ libs/libmythtv/tv_play.cpp (working copy) @@ -160,8 +160,7 @@ } } - if (reclist) - delete reclist; + delete reclist; continue; } else @@ -705,10 +704,8 @@ runMainLoop = false; pthread_join(event, NULL); - if (prbuffer) - delete prbuffer; - if (nvp) - delete nvp; + delete prbuffer; + delete nvp; if (myWindow) { delete myWindow; @@ -719,17 +716,13 @@ if (!gContext->GetNumSetting("GuiSizeForTV", 0)) mwnd->move(saved_gui_bounds.topLeft()); } - if (recorderPlaybackInfo) - delete recorderPlaybackInfo; + delete recorderPlaybackInfo; - if (treeMenu) - delete treeMenu; + delete treeMenu; - if (playbackinfo) - delete playbackinfo; + delete playbackinfo; - if (lastProgram) - delete lastProgram; + delete lastProgram; if (class LCD * lcd = LCD::Get()) lcd->switchToTime(); @@ -1174,8 +1167,7 @@ StopStuff(true, true, true); pbinfoLock.lock(); - if (playbackinfo) - delete playbackinfo; + delete playbackinfo; playbackinfo = NULL; pbinfoLock.unlock(); @@ -1617,11 +1609,8 @@ delete xnvp; } - if (udpnotify) - { - delete udpnotify; - udpnotify = NULL; - } + delete udpnotify; + udpnotify = NULL; paused = false; doing_ff_rew = 0; @@ -1631,24 +1620,17 @@ normal_speed = 1.0f; pbinfoLock.lock(); - if (playbackinfo) - delete playbackinfo; + delete playbackinfo; playbackinfo = NULL; pbinfoLock.unlock(); DeleteRecorder(); - if (prbuffer) - { - delete prbuffer; - prbuffer = activerbuffer = NULL; - } + delete prbuffer; + prbuffer = activerbuffer = NULL; - if (piprbuffer) - { - delete piprbuffer; - piprbuffer = NULL; - } + delete piprbuffer; + piprbuffer = NULL; if (tvchain) { @@ -1677,17 +1659,11 @@ delete xnvp; } - if (piprecorder) - { - delete piprecorder; - piprecorder = NULL; - } + delete piprecorder; + piprecorder = NULL; - if (piprbuffer) - { - delete piprbuffer; - piprbuffer = NULL; - } + delete piprbuffer; + piprbuffer = NULL; if (piptvchain) { @@ -3369,8 +3345,7 @@ if (!testrec || !testrec->IsValidRecorder()) { VERBOSE(VB_IMPORTANT, LOC_ERR + "PiP failed to locate recorder"); - if (testrec) - delete testrec; + delete testrec; return; } @@ -3985,11 +3960,8 @@ delete prbuffer; activerbuffer = prbuffer = NULL; - if (playbackinfo) - { - delete playbackinfo; - playbackinfo = NULL; - } + delete playbackinfo; + playbackinfo = NULL; // now restart stuff lastSignalUIInfo.clear(); @@ -4407,8 +4379,7 @@ { ClearInputQueues(true); ShowNoRecorderDialog(); - if (testrec) - delete testrec; + delete testrec; return; } @@ -5128,8 +5099,7 @@ if (!paused) DoPause(false); } - if (theme) - delete theme; + delete theme; nextProgram = RunPlaybackBoxPtr((void *)this); if (nextProgram) { @@ -5186,8 +5156,7 @@ stayPaused = true; } } - if (theme) - delete theme; + delete theme; nextProgram = RunPlaybackBoxPtr((void *)this); if (IsEmbedding()) StopEmbeddingOutput(); @@ -5265,6 +5234,7 @@ pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + pthread_attr_destroy(&attr); switch (editType) { Index: libs/libmythtv/videoout_null.cpp =================================================================== --- libs/libmythtv/videoout_null.cpp (revision 13705) +++ libs/libmythtv/videoout_null.cpp (working copy) @@ -23,8 +23,7 @@ VideoOutputNull::~VideoOutputNull() { VERBOSE(VB_PLAYBACK, "~VideoOutputNull()"); - if (pauseFrame.buf) - delete [] pauseFrame.buf; + delete [] pauseFrame.buf; Exit(); } @@ -62,8 +61,7 @@ errored = true; } - if (pauseFrame.buf) - delete [] pauseFrame.buf; + delete [] pauseFrame.buf; pauseFrame.height = vbuffers.GetScratchFrame()->height; pauseFrame.width = vbuffers.GetScratchFrame()->width; Index: libs/libmythtv/videooutbase.cpp =================================================================== --- libs/libmythtv/videooutbase.cpp (revision 13705) +++ libs/libmythtv/videooutbase.cpp (working copy) @@ -226,10 +226,8 @@ ShutdownVideoResize(); - if (m_deintFilter) - delete m_deintFilter; - if (m_deintFiltMan) - delete m_deintFiltMan; + delete m_deintFilter; + delete m_deintFiltMan; } /** @@ -294,16 +292,10 @@ if (m_deinterlacing == interlaced) return m_deinterlacing; - if (m_deintFiltMan) - { - delete m_deintFiltMan; - m_deintFiltMan = NULL; - } - if (m_deintFilter) - { - delete m_deintFilter; - m_deintFilter = NULL; - } + delete m_deintFiltMan; + m_deintFiltMan = NULL; + delete m_deintFilter; + m_deintFilter = NULL; m_deinterlacing = interlaced; @@ -1056,11 +1048,8 @@ */ void VideoOutput::ShutdownPipResize(void) { - if (pip_tmp_buf) - { - delete [] pip_tmp_buf; - pip_tmp_buf = NULL; - } + delete [] pip_tmp_buf; + pip_tmp_buf = NULL; if (pip_scaling_context) { @@ -1307,11 +1296,8 @@ void VideoOutput::ShutdownVideoResize(void) { - if (vsz_tmp_buf) - { - delete [] vsz_tmp_buf; - vsz_tmp_buf = NULL; - } + delete [] vsz_tmp_buf; + vsz_tmp_buf = NULL; if (vsz_scale_context) { Index: libs/libmythtv/dvbchannel.cpp =================================================================== --- libs/libmythtv/dvbchannel.cpp (revision 13705) +++ libs/libmythtv/dvbchannel.cpp (working copy) @@ -85,11 +85,7 @@ DVBChannel::~DVBChannel() { Close(); - if (dvbcam) - { - delete dvbcam; - dvbcam = NULL; - } + delete dvbcam; // diseqc_tree is managed elsewhere } Index: libs/libmythtv/videosource.cpp =================================================================== --- libs/libmythtv/videosource.cpp (revision 13705) +++ libs/libmythtv/videosource.cpp (working copy) @@ -1833,11 +1833,7 @@ CardInput::~CardInput() { - if (externalInputSettings) - { - delete externalInputSettings; - externalInputSettings = NULL; - } + delete externalInputSettings; } void CardInput::SetSourceID(const QString &sourceid) Index: libs/libmythtv/dvbcam.cpp =================================================================== --- libs/libmythtv/dvbcam.cpp (revision 13705) +++ libs/libmythtv/dvbcam.cpp (working copy) @@ -124,11 +124,8 @@ pthread_join(ciHandlerThread, NULL); } - if (ciHandler) - { - delete ciHandler; - ciHandler = NULL; - } + delete ciHandler; + ciHandler = NULL; return true; } Index: libs/libmythtv/videoout_xv.cpp =================================================================== --- libs/libmythtv/videoout_xv.cpp (revision 13705) +++ libs/libmythtv/videoout_xv.cpp (working copy) @@ -167,8 +167,7 @@ if (display_res) display_res->SwitchToGUI(); - if (xvmc_tex) - delete xvmc_tex; + delete xvmc_tex; } // this is documented in videooutbase.cpp @@ -656,11 +655,8 @@ { vbuffers.LockFrame(&av_pause_frame, "CreatePauseFrame"); - if (av_pause_frame.buf) - { - delete [] av_pause_frame.buf; - av_pause_frame.buf = NULL; - } + delete [] av_pause_frame.buf; + av_pause_frame.buf = NULL; init(&av_pause_frame, FMT_YV12, new unsigned char[vbuffers.GetScratchFrame()->size + 128], @@ -1783,16 +1779,10 @@ if (delete_pause_frame) { - if (av_pause_frame.buf) - { - delete [] av_pause_frame.buf; - av_pause_frame.buf = NULL; - } - if (av_pause_frame.qscale_table) - { - delete [] av_pause_frame.qscale_table; - av_pause_frame.qscale_table = NULL; - } + delete [] av_pause_frame.buf; + av_pause_frame.buf = NULL; + delete [] av_pause_frame.qscale_table; + av_pause_frame.qscale_table = NULL; } for (uint i = 0; i < XJ_shm_infos.size(); i++) Index: libs/libmythtv/udpnotify.cpp =================================================================== --- libs/libmythtv/udpnotify.cpp (revision 13705) +++ libs/libmythtv/udpnotify.cpp (working copy) @@ -60,8 +60,7 @@ for (; i != allTypes->end(); i++) { UDPNotifyOSDTypeText *type = (*i); - if (type) - delete type; + delete type; } delete allTypes; } @@ -167,8 +166,7 @@ delete qsd; - if (qsn) - delete qsn; + delete qsn; qApp->unlock(); @@ -176,8 +174,7 @@ for (; i != setList->end(); i++) { UDPNotifyOSDSet *set = (*i); - if (set) - delete set; + delete set; } delete setList; } Index: libs/libmythtv/remoteutil.cpp =================================================================== --- libs/libmythtv/remoteutil.cpp (revision 13705) +++ libs/libmythtv/remoteutil.cpp (working copy) @@ -446,8 +446,7 @@ vector *info = new vector; if (!RemoteGetRecordingList(info, strlist)) { - if (info) - delete info; + delete info; return reclist; } @@ -462,8 +461,7 @@ reclist->push_back(new ProgramInfo(*p)); } - if (info) - delete info; + delete info; return reclist; } Index: libs/libmythtv/decoderbase.cpp =================================================================== --- libs/libmythtv/decoderbase.cpp (revision 13705) +++ libs/libmythtv/decoderbase.cpp (working copy) @@ -55,14 +55,12 @@ DecoderBase::~DecoderBase() { - if (m_playbackinfo) - delete m_playbackinfo; + delete m_playbackinfo; } void DecoderBase::SetProgramInfo(ProgramInfo *pginfo) { - if (m_playbackinfo) - delete m_playbackinfo; + delete m_playbackinfo; m_playbackinfo = NULL; if (pginfo) Index: libs/libmythtv/iptvchannel.cpp =================================================================== --- libs/libmythtv/iptvchannel.cpp (revision 13705) +++ libs/libmythtv/iptvchannel.cpp (working copy) @@ -30,11 +30,7 @@ IPTVChannel::~IPTVChannel() { VERBOSE(VB_CHANNEL, LOC + "dtor -- begin"); - if (m_feeder) - { - delete m_feeder; - m_feeder = NULL; - } + delete m_feeder; VERBOSE(VB_CHANNEL, LOC + "dtor -- end"); } Index: libs/libmythtv/tv_rec.cpp =================================================================== --- libs/libmythtv/tv_rec.cpp (revision 13705) +++ libs/libmythtv/tv_rec.cpp (working copy) @@ -288,17 +288,11 @@ TeardownSignalMonitor(); - if (scanner) - { - delete scanner; - scanner = NULL; - } + delete scanner; + scanner = NULL; - if (channel) - { - delete channel; - channel = NULL; - } + delete channel; + channel = NULL; TeardownRecorder(true); @@ -358,8 +352,7 @@ void TVRec::RecordPending(const ProgramInfo *rcinfo, int secsleft) { QMutexLocker lock(&stateChangeLock); - if (pendingRecording) - delete pendingRecording; + delete pendingRecording; pendingRecording = new ProgramInfo(*rcinfo); recordPendingStart = QDateTime::currentDateTime().addSecs(secsleft); @@ -373,8 +366,7 @@ { ProgramInfo *old_rec = pseudoLiveTVRecording; pseudoLiveTVRecording = pi; - if (old_rec) - delete old_rec; + delete old_rec; } /** \fn TVRec::GetRecordEndTime(const ProgramInfo*) const @@ -527,11 +519,8 @@ retval = rsTunerBusy; } - if (pendingRecording) - { - delete pendingRecording; - pendingRecording = NULL; - } + delete pendingRecording; + pendingRecording = NULL; WaitForEventThreadSleep(); @@ -2402,8 +2391,7 @@ SetPseudoLiveTVRecording(NULL); } - if (pi) - delete pi; + delete pi; } static uint get_input_id(uint cardid, const QString &inputname) @@ -4205,8 +4193,7 @@ } else if (!set_rec) { - if (curRecording) - delete curRecording; + delete curRecording; curRecording = pginfo; SetRingBuffer(rb); } Index: libs/libmythtv/programinfo.cpp =================================================================== --- libs/libmythtv/programinfo.cpp (revision 13705) +++ libs/libmythtv/programinfo.cpp (working copy) @@ -953,8 +953,7 @@ delete nextday; return 1; } - if (nextday) - delete nextday; + delete nextday; } QDateTime checktime = dtime.addDays(7); @@ -969,8 +968,7 @@ return 2; } - if (nextweek) - delete nextweek; + delete nextweek; return 0; } Index: libs/libmythtv/osdxvmc.cpp =================================================================== --- libs/libmythtv/osdxvmc.cpp (revision 13705) +++ libs/libmythtv/osdxvmc.cpp (working copy) @@ -152,8 +152,7 @@ X11S(XSync(XJ_disp, false)); - if (osd_palette) - delete [] osd_palette; + delete [] osd_palette; } void XvMCOSD::CompositeOSD(VideoFrame* frame, VideoFrame* osdframe) Index: libs/libmythtv/eitscanner.cpp =================================================================== --- libs/libmythtv/eitscanner.cpp (revision 13705) +++ libs/libmythtv/eitscanner.cpp (working copy) @@ -46,11 +46,8 @@ pthread_join(eventThread, NULL); } - if (eitHelper) - { - delete eitHelper; - eitHelper = NULL; - } + delete eitHelper; + eitHelper = NULL; } /** \fn EITScanner::SpawnEventLoop(void*) Index: libs/libmythtv/videoout_ivtv.cpp =================================================================== --- libs/libmythtv/videoout_ivtv.cpp (revision 13705) +++ libs/libmythtv/videoout_ivtv.cpp (working copy) @@ -89,8 +89,7 @@ close(fbfd); } - if (osdbuffer) - delete [] osdbuffer; + delete [] osdbuffer; } void VideoOutputIvtv::ClearOSD(void) Index: libs/libmythtv/ttfont.cpp =================================================================== --- libs/libmythtv/ttfont.cpp (revision 13705) +++ libs/libmythtv/ttfont.cpp (working copy) @@ -152,8 +152,7 @@ { if (!rmap) return; - if (rmap->bitmap) - delete [] rmap->bitmap; + delete [] rmap->bitmap; delete rmap; } Index: libs/libmythtv/osd.cpp =================================================================== --- libs/libmythtv/osd.cpp (revision 13705) +++ libs/libmythtv/osd.cpp (working copy) @@ -98,22 +98,18 @@ for (; fonts != fontMap.end(); ++fonts) { TTFFont *font = (*fonts); - if (font) - delete font; + delete font; } QMap::iterator sets = setMap.begin(); for (; sets != setMap.end(); ++sets) { OSDSet *set = (*sets); - if (set) - delete set; + delete set; } - if (editarrowleft) - delete editarrowleft; - if (editarrowright) - delete editarrowright; + delete editarrowleft; + delete editarrowright; delete setList; delete drawSurface; Index: libs/libmythtv/diseqc.cpp =================================================================== --- libs/libmythtv/diseqc.cpp (revision 13705) +++ libs/libmythtv/diseqc.cpp (working copy) @@ -963,8 +963,7 @@ dvbdev_vec_t::iterator it = m_children.begin(); for (; it != m_children.end(); ++it) { - if (*it) - delete *it; + delete *it; } } @@ -1072,8 +1071,7 @@ if (ordinal >= m_children.size()) return false; - if (m_children[ordinal]) - delete m_children[ordinal]; + delete m_children[ordinal]; m_children[ordinal] = device; if (device) @@ -1103,8 +1101,7 @@ dvbdev_vec_t::iterator it = m_children.begin(); for (; it != m_children.end(); ++it) { - if (*it) - delete *it; + delete *it; } m_children.clear(); @@ -1232,8 +1229,7 @@ { for (uint ch = num_ports; ch < old_num; ch++) { - if (m_children[ch]) - delete m_children[ch]; + delete m_children[ch]; } m_children.resize(num_ports); } @@ -1502,8 +1498,7 @@ DiSEqCDevRotor::~DiSEqCDevRotor() { - if (m_child) - delete m_child; + delete m_child; } bool DiSEqCDevRotor::Execute(const DiSEqCDevSettings &settings, @@ -1573,8 +1568,7 @@ DiSEqCDevDevice *old_child = m_child; m_child = NULL; - if (old_child) - delete old_child; + delete old_child; m_child = device; if (m_child) @@ -1648,11 +1642,8 @@ } // load children from db - if (m_child) - { - delete m_child; - m_child = NULL; - } + delete m_child; + m_child = NULL; query.prepare( "SELECT diseqcid " Index: libs/libmythtv/linuxfirewiredevice.cpp =================================================================== --- libs/libmythtv/linuxfirewiredevice.cpp (revision 13705) +++ libs/libmythtv/linuxfirewiredevice.cpp (working copy) @@ -145,11 +145,7 @@ ClosePort(); } - if (m_priv) - { - delete m_priv; - m_priv = NULL; - } + delete m_priv; } void LinuxFirewireDevice::SignalReset(uint generation) Index: libs/libmythtv/videobuffers.cpp =================================================================== --- libs/libmythtv/videobuffers.cpp (revision 13705) +++ libs/libmythtv/videobuffers.cpp (working copy) @@ -197,11 +197,8 @@ frame_vector_t::iterator it = buffers.begin(); for (;it != buffers.end(); it++) { - if (it->qscale_table) - { - delete [] it->qscale_table; - it->qscale_table = NULL; - } + delete [] it->qscale_table; + it->qscale_table = NULL; } available.clear(); @@ -1235,11 +1232,8 @@ { buffers[i].buf = NULL; - if (buffers[i].qscale_table) - { - delete [] buffers[i].qscale_table; - buffers[i].qscale_table = NULL; - } + delete [] buffers[i].qscale_table; + buffers[i].qscale_table = NULL; } for (uint i = 0; i < allocated_structs.size(); i++) Index: libs/libmythtv/videoout_dx.cpp =================================================================== --- libs/libmythtv/videoout_dx.cpp (revision 13705) +++ libs/libmythtv/videoout_dx.cpp (working copy) @@ -76,8 +76,7 @@ VideoOutputDX::~VideoOutputDX() { - if (pauseFrame.buf) - delete [] pauseFrame.buf; + delete [] pauseFrame.buf; DirectXCloseSurface(); DirectXCloseDisplay(); @@ -116,8 +115,7 @@ MoveResize(); - if (pauseFrame.buf) - delete [] pauseFrame.buf; + delete [] pauseFrame.buf; pauseFrame.height = vbuffers.GetScratchFrame()->height; pauseFrame.width = vbuffers.GetScratchFrame()->width; Index: libs/libmythui/mythmainwindow.cpp =================================================================== --- libs/libmythui/mythmainwindow.cpp (revision 13705) +++ libs/libmythui/mythmainwindow.cpp (working copy) @@ -232,8 +232,7 @@ void MythMainWindow::destroyMainWindow(void) { - if (mainWin) - delete mainWin; + delete mainWin; mainWin = NULL; } Index: libs/libmythui/mythuitext.cpp =================================================================== --- libs/libmythui/mythuitext.cpp (revision 13705) +++ libs/libmythui/mythuitext.cpp (working copy) @@ -47,11 +47,7 @@ MythUIText::~MythUIText() { - if (m_Font) - { - delete m_Font; - m_Font = NULL; - } + delete m_Font; } void MythUIText::SetText(const QString &text) Index: libs/libmythui/xmlparsebase.cpp =================================================================== --- libs/libmythui/xmlparsebase.cpp (revision 13705) +++ libs/libmythui/xmlparsebase.cpp (working copy) @@ -137,8 +137,7 @@ parent->AddFont(name, font); } - if (font) - delete font; + delete font; } else if (type == "imagetype" || type == "textarea" || @@ -257,8 +256,7 @@ uitype->AddFont(name, font); } - if (font) - delete font; + delete font; } else if (info.tagName() == "imagetype" || info.tagName() == "textarea" || Index: libs/libmythui/myththemedmenu.cpp =================================================================== --- libs/libmythui/myththemedmenu.cpp (revision 13705) +++ libs/libmythui/myththemedmenu.cpp (working copy) @@ -1091,8 +1091,7 @@ allButtonIcons[name] = newbutton; - if (tmpimg) - delete tmpimg; + delete tmpimg; } void MythThemedMenuState::setDefaults(void) @@ -2327,8 +2326,7 @@ MythThemedMenu::~MythThemedMenu(void) { - if (d) - delete d; + delete d; } bool MythThemedMenu::foundTheme(void) Index: libs/libmythui/mythlistbutton.cpp =================================================================== --- libs/libmythui/mythlistbutton.cpp (revision 13705) +++ libs/libmythui/mythlistbutton.cpp (working copy) @@ -77,10 +77,8 @@ delete m_topIterator; delete m_selIterator; - if (m_fontActive) - delete m_fontActive; - if (m_fontInactive) - delete m_fontInactive; + delete m_fontActive; + delete m_fontInactive; if (itemRegPix) itemRegPix->DownRef(); @@ -714,10 +712,8 @@ else if (element.tagName() == "scrollarrows") { m_showScrollArrows = parseBool(element.attribute("show", "")); - if (m_upArrow) - delete m_upArrow; - if (m_downArrow) - delete m_downArrow; + delete m_upArrow; + delete m_downArrow; ParseChildren(element, this); m_upArrow = dynamic_cast(GetChild("upscrollarrow")); m_downArrow = dynamic_cast(GetChild("downscrollarrow")); Index: libs/libmythui/mythuiclock.cpp =================================================================== --- libs/libmythui/mythuiclock.cpp (revision 13705) +++ libs/libmythui/mythuiclock.cpp (working copy) @@ -26,11 +26,7 @@ MythUIClock::~MythUIClock() { - if (m_Font) - { - delete m_Font; - m_Font = NULL; - } + delete m_Font; } void MythUIClock::Pulse(void) Index: libs/libmyth/oldsettings.cpp =================================================================== --- libs/libmyth/oldsettings.cpp (revision 13705) +++ libs/libmyth/oldsettings.cpp (working copy) @@ -35,8 +35,7 @@ Settings::~Settings() { - if (m_pSettings != NULL) - delete m_pSettings; + delete m_pSettings; } // Setting retrieval functions Index: libs/libmyth/mythdialogs.cpp =================================================================== --- libs/libmyth/mythdialogs.cpp (revision 13705) +++ libs/libmyth/mythdialogs.cpp (working copy) @@ -780,10 +780,8 @@ bool MythThemedDialog::loadThemedWindow(QString window_name, QString theme_filename) { + delete theme; - if (theme) - delete theme; - context = -1; my_containers.clear(); widget_with_current_focus = NULL; @@ -871,8 +869,7 @@ MythThemedDialog::~MythThemedDialog() { - if (theme) - delete theme; + delete theme; } void MythThemedDialog::loadWindow(QDomElement &element) @@ -1877,17 +1874,8 @@ MythSearchDialog::~MythSearchDialog() { - if (listbox) - { - delete listbox; - listbox = NULL; - } - - if (editor) - { - delete editor; - editor = NULL; - } + delete listbox; + delete editor; } /* @@ -2277,14 +2265,10 @@ m_parent->detach(this); delete m_bgPixmap; - if (m_upArrowPix) - delete m_upArrowPix; - if (m_dnArrowPix) - delete m_dnArrowPix; - if (m_ltArrowPix) - delete m_ltArrowPix; - if (m_rtArrowPix) - delete m_rtArrowPix; + delete m_upArrowPix; + delete m_dnArrowPix; + delete m_ltArrowPix; + delete m_rtArrowPix; } void MythScrollDialog::setArea(int w, int h) Index: libs/libmyth/mythwidgets.cpp =================================================================== --- libs/libmyth/mythwidgets.cpp (revision 13705) +++ libs/libmyth/mythwidgets.cpp (working copy) @@ -18,8 +18,7 @@ MythComboBox::~MythComboBox() { - if (popup) - delete popup; + delete popup; } void MythComboBox::Init() @@ -356,8 +355,7 @@ MythLineEdit::~MythLineEdit() { - if (popup) - delete popup; + delete popup; } void MythLineEdit::Init() @@ -976,13 +974,8 @@ MythRemoteLineEdit::~MythRemoteLineEdit() { - if (cycle_timer) - { - delete cycle_timer; - } - - if (popup) - delete popup; + delete cycle_timer; + delete popup; } void MythRemoteLineEdit::insert(QString text) Index: libs/libmyth/httpcomms.cpp =================================================================== --- libs/libmyth/httpcomms.cpp (revision 13705) +++ libs/libmyth/httpcomms.cpp (working copy) @@ -32,8 +32,7 @@ HttpComms::~HttpComms() { - if (m_timer) - delete m_timer; + delete m_timer; delete http; } @@ -296,8 +295,7 @@ VERBOSE(VB_NETWORK, QString("getHttp: grabbing: %1").arg(qurl.toString())); - if (httpGrabber != NULL) - delete httpGrabber; + delete httpGrabber; httpGrabber = new HttpComms; @@ -390,8 +388,7 @@ VERBOSE(VB_NETWORK, QString("getHttp: grabbing: '%1'") .arg(qurl.toString())); - if (httpGrabber != NULL) - delete httpGrabber; + delete httpGrabber; httpGrabber = new HttpComms; @@ -525,8 +522,7 @@ VERBOSE(VB_NETWORK, QString("postHttp: grabbing: %1").arg(url.toString())); - if (httpGrabber != NULL) - delete httpGrabber; + delete httpGrabber; httpGrabber = new HttpComms; Index: libs/libmyth/uilistbtntype.cpp =================================================================== --- libs/libmyth/uilistbtntype.cpp (revision 13705) +++ libs/libmyth/uilistbtntype.cpp (working copy) @@ -54,8 +54,7 @@ void UIListGenericTree::RemoveFromParent(void) { - if (m_physitem) - delete m_physitem; + delete m_physitem; m_physitem = NULL; if (getParent()) Index: libs/libmyth/xmlparse.cpp =================================================================== --- libs/libmyth/xmlparse.cpp (revision 13705) +++ libs/libmyth/xmlparse.cpp (working copy) @@ -21,8 +21,7 @@ for (; i != allTypes->end(); i++) { LayerSet *type = (*i); - if (type) - delete type; + delete type; } delete allTypes; } Index: libs/libmyth/uitypes.cpp =================================================================== --- libs/libmyth/uitypes.cpp (revision 13705) +++ libs/libmyth/uitypes.cpp (working copy) @@ -29,8 +29,7 @@ for (; i != allTypes->end(); i++) { UIType *type = (*i); - if (type) - delete type; + delete type; } delete allTypes; } @@ -1546,11 +1545,8 @@ for (; i != imageList->end(); i++) { QPixmap *pixmap = (*i); - if (pixmap) - { - delete pixmap; - (*i) = NULL; - } + delete pixmap; + (*i) = NULL; } } } @@ -1920,30 +1916,19 @@ UIImageGridType::~UIImageGridType(void) { - if (normalPixmap) - delete normalPixmap; - if (highlightedPixmap) - delete highlightedPixmap; - if (selectedPixmap) - delete selectedPixmap; - if (defaultPixmap) - delete defaultPixmap; + delete normalPixmap; + delete highlightedPixmap; + delete selectedPixmap; + delete defaultPixmap; - if (checkNonPixmap) - delete checkNonPixmap; - if (checkHalfPixmap) - delete checkHalfPixmap; - if (checkFullPixmap) - delete checkFullPixmap; + delete checkNonPixmap; + delete checkHalfPixmap; + delete checkFullPixmap; - if (upArrowRegPixmap) - delete upArrowRegPixmap; - if (upArrowActPixmap) - delete upArrowActPixmap; - if (dnArrowRegPixmap) - delete dnArrowRegPixmap; - if (upArrowActPixmap) - delete dnArrowActPixmap; + delete upArrowRegPixmap; + delete upArrowActPixmap; + delete dnArrowRegPixmap; + delete dnArrowActPixmap; delete allData; } @@ -2554,17 +2539,13 @@ UIRichTextType::~UIRichTextType() { - if (m_image) - delete m_image; + delete m_image; - if (m_background) - delete m_background; + delete m_background; - if (m_backgroundImage) - delete m_backgroundImage; + delete m_backgroundImage; - if (m_compBackground) - delete m_compBackground; + delete m_compBackground; } void UIRichTextType::SetText(const QString &text) @@ -2609,8 +2590,7 @@ { if (file != m_backgroundFile) { - if (m_backgroundImage) - delete m_backgroundImage; + delete m_backgroundImage; m_backgroundImage = gContext->LoadScaleImage(file, true); m_backgroundFile = file; @@ -2803,11 +2783,7 @@ UIRemoteEditType::~UIRemoteEditType() { - if (edit) - { - delete edit; - edit = NULL; - } + delete edit; } void UIRemoteEditType::setText(const QString text) Index: libs/libmyth/mythcontext.cpp =================================================================== --- libs/libmyth/mythcontext.cpp (revision 13705) +++ libs/libmyth/mythcontext.cpp (working copy) @@ -284,7 +284,7 @@ DisplayRes *display_res; - QMutex *m_priv_mutex; + QMutex m_priv_mutex; queue m_priv_requests; QWaitCondition m_priv_queued; @@ -321,7 +321,6 @@ m_logenable(-1), m_logmaxcount(-1), m_logprintlevel(-1), screensaverEnabled(false), display_res(NULL), - m_priv_mutex(new QMutex(true)), useSettingsCache(false) { GetInstallPrefixPath( m_installprefix, m_installlibdir ); @@ -454,18 +453,13 @@ { imageCache.clear(); - if (m_settings) - delete m_settings; - if (m_qtThemeSettings) - delete m_qtThemeSettings; + delete m_settings; + delete m_qtThemeSettings; if (serverSock) serverSock->DownRef(); if (eventSock) eventSock->DownRef(); - if (m_priv_mutex) - delete m_priv_mutex; - if (screensaver) - delete screensaver; + delete screensaver; } // Apply any user overrides to the screen geometry @@ -543,8 +537,7 @@ { if (reload) { - if (m_settings) - delete m_settings; + delete m_settings; m_settings = new Settings; } @@ -850,8 +843,7 @@ MythContext::~MythContext() { - if (d) - delete d; + delete d; } bool MythContext::ConnectToMasterServer(bool blockingClient) @@ -1250,8 +1242,7 @@ d->GetScreenBounds(); - if (d->m_qtThemeSettings) - delete d->m_qtThemeSettings; + delete d->m_qtThemeSettings; d->m_qtThemeSettings = new Settings; @@ -1282,8 +1273,7 @@ d->m_qtThemeSettings->ReadSettings(themedir); d->m_themeloaded = false; - if (d->m_backgroundimage) - delete d->m_backgroundimage; + delete d->m_backgroundimage; d->m_backgroundimage = NULL; themename = GetSetting("MenuTheme"); @@ -2175,8 +2165,7 @@ d->m_themeloaded = true; - if (bgpixmap) - delete bgpixmap; + delete bgpixmap; } bool MythContext::FindThemeFile(QString &filename) @@ -2874,24 +2863,22 @@ void MythContext::addPrivRequest(MythPrivRequest::Type t, void *data) { - QMutexLocker lockit(d->m_priv_mutex); + QMutexLocker lockit(&d->m_priv_mutex); d->m_priv_requests.push(MythPrivRequest(t, data)); d->m_priv_queued.wakeAll(); } void MythContext::waitPrivRequest() const { - while (true) - { - d->m_priv_queued.wait(); - if (!d->m_priv_requests.empty()) - return; - } + d->m_priv_mutex.lock(); + while (d->m_priv_requests.empty()) + d->m_priv_queued.wait(&d->m_priv_mutex); + d->m_priv_mutex.unlock(); } MythPrivRequest MythContext::popPrivRequest() { - QMutexLocker lockit(d->m_priv_mutex); + QMutexLocker lockit(&d->m_priv_mutex); MythPrivRequest ret_val(MythPrivRequest::PrivEnd, NULL); if (!d->m_priv_requests.empty()) { ret_val = d->m_priv_requests.front(); Index: libs/libmyth/jsmenu.cpp =================================================================== --- libs/libmyth/jsmenu.cpp (revision 13705) +++ libs/libmyth/jsmenu.cpp (working copy) @@ -71,17 +71,9 @@ fd = -1; } - if (axes) - { - delete [] axes; - axes = NULL; - } + delete [] axes; - if (buttons) - { - delete [] buttons; - buttons = NULL; - } + delete [] buttons; } /*---------------------------------------------------------------------------- Index: libs/libmyth/audiooutputbase.cpp =================================================================== --- libs/libmyth/audiooutputbase.cpp (revision 13705) +++ libs/libmyth/audiooutputbase.cpp (working copy) @@ -267,11 +267,8 @@ need_resampler = false; // close sound stretcher - if (pSoundStretch) - { - delete pSoundStretch; - pSoundStretch = NULL; - } + delete pSoundStretch; + pSoundStretch = NULL; CloseDevice(); Index: libs/libmyth/mediamonitor-unix.cpp =================================================================== --- libs/libmyth/mediamonitor-unix.cpp (revision 13705) +++ libs/libmyth/mediamonitor-unix.cpp (working copy) @@ -567,8 +567,7 @@ } } - if (pDevice) - delete pDevice; + delete pDevice; return false; } Index: programs/mythfrontend/playbackbox.cpp =================================================================== --- programs/mythfrontend/playbackbox.cpp (revision 13705) +++ programs/mythfrontend/playbackbox.cpp (working copy) @@ -438,30 +438,18 @@ freeSpaceTimer = NULL; } - if (theme) - { - delete theme; - theme = NULL; - } + delete theme; + theme = NULL; - if (drawTransPixmap) - { - delete drawTransPixmap; - drawTransPixmap = NULL; - } + delete drawTransPixmap; + drawTransPixmap = NULL; - if (curitem) - { - delete curitem; - curitem = NULL; - } + delete curitem; + curitem = NULL; + + delete delitem; + delitem = NULL; - if (delitem) - { - delete delitem; - delitem = NULL; - } - clearProgramCache(); // disconnect preview generators @@ -475,11 +463,8 @@ // free preview pixmap after preview generators are // no longer telling us about any new previews. - if (previewPixmap) - { - delete previewPixmap; - previewPixmap = NULL; - } + delete previewPixmap; + previewPixmap = NULL; } int PlaybackBox::exec(void) @@ -628,8 +613,7 @@ { if (m_player) { - if (curitem) - delete curitem; + delete curitem; curitem = NULL; pbbIsVisibleCond.wakeAll(); } @@ -1159,11 +1143,8 @@ int progCount = plist->count(); - if (curitem) - { - delete curitem; - curitem = NULL; - } + delete curitem; + curitem = NULL; if (container && titleList.count() >= 1) { @@ -2450,8 +2431,7 @@ { previewVideoState = kStopping; - if (delitem) - delete delitem; + delete delitem; delitem = new ProgramInfo(*toDel); showDeletePopup(delitem, DeleteRecording); @@ -2461,8 +2441,7 @@ { killPlayer(); - if (delitem) - delete delitem; + delete delitem; delitem = new ProgramInfo(*toExp); @@ -3182,8 +3161,7 @@ cancelPopup(); - if (curitem) - delete curitem; + delete curitem; curitem = new ProgramInfo(*delitem); @@ -3819,8 +3797,7 @@ if (tmpItem) { - if (curitem) - delete curitem; + delete curitem; curitem = tmpItem; @@ -4093,11 +4070,8 @@ previewLastModified == previewFilets && titleList.count() > 1) { - if (previewPixmap) - { - delete previewPixmap; - previewPixmap = NULL; - } + delete previewPixmap; + previewPixmap = NULL; // ask for repaint update(drawVideoBounds); @@ -4191,11 +4165,8 @@ paintSkipUpdate = false; // repaint background next time around - if (previewPixmap) - { - delete previewPixmap; - previewPixmap = NULL; - } + delete previewPixmap; + previewPixmap = NULL; int screenheight = 0, screenwidth = 0; float wmult = 0, hmult = 0; @@ -4409,11 +4380,8 @@ setActiveWindow(); - if (delitem) - { - delete delitem; - delitem = NULL; - } + delete delitem; + delitem = NULL; } void PlaybackBox::showViewChanger(void) @@ -4757,11 +4725,8 @@ { // If delitem is not NULL, then the Recording Group changer will operate // on just that recording, otherwise it operates on the items in theplaylist - if (delitem) - { - delete delitem; - delitem = NULL; - } + delete delitem; + delitem = NULL; showRecGroupChanger(); } @@ -4859,11 +4824,8 @@ { // If delitem is not NULL, then the Playback Group changer will operate // on just that recording, otherwise it operates on the items in theplaylist - if (delitem) - { - delete delitem; - delitem = NULL; - } + delete delitem; + delitem = NULL; showPlayGroupChanger(); } Index: programs/mythfrontend/channelrecpriority.cpp =================================================================== --- programs/mythfrontend/channelrecpriority.cpp (revision 13705) +++ programs/mythfrontend/channelrecpriority.cpp (working copy) @@ -101,10 +101,8 @@ gContext->removeListener(this); gContext->removeCurrentLocation(); delete theme; - if (bgTransBackup) - delete bgTransBackup; - if (curitem) - delete curitem; + delete bgTransBackup; + delete curitem; } void ChannelRecPriority::keyPressEvent(QKeyEvent *e) @@ -582,8 +580,7 @@ if (cnt == inList) { - if (curitem) - delete curitem; + delete curitem; curitem = new ChannelInfo(*chanInfo); ltype->SetItemCurrent(cnt); } Index: programs/mythfrontend/main.cpp =================================================================== --- programs/mythfrontend/main.cpp (revision 13705) +++ programs/mythfrontend/main.cpp (working copy) @@ -1263,8 +1263,7 @@ pthread_join(priv_thread, &value); } - if (networkControl) - delete networkControl; + delete networkControl; DestroyMythMainWindow(); delete themeBase; Index: programs/mythfrontend/programrecpriority.cpp =================================================================== --- programs/mythfrontend/programrecpriority.cpp (revision 13705) +++ programs/mythfrontend/programrecpriority.cpp (working copy) @@ -156,10 +156,8 @@ gContext->removeListener(this); gContext->removeCurrentLocation(); delete theme; - if (bgTransBackup) - delete bgTransBackup; - if (curitem) - delete curitem; + delete bgTransBackup; + delete curitem; } void ProgramRecPriority::keyPressEvent(QKeyEvent *e) @@ -1316,8 +1314,7 @@ if (cnt == inList) { - if (curitem) - delete curitem; + delete curitem; curitem = new ProgramRecPriorityInfo(*progInfo); ltype->SetItemCurrent(cnt); } Index: programs/mythtranscode/transcode.cpp =================================================================== --- programs/mythtranscode/transcode.cpp (revision 13705) +++ programs/mythtranscode/transcode.cpp (working copy) @@ -240,16 +240,11 @@ } Transcode::~Transcode() { - if (nvr) - delete nvr; - if (nvp) - delete nvp; - if (inRingBuffer) - delete inRingBuffer; - if (outRingBuffer) - delete outRingBuffer; - if (fifow) - delete fifow; + delete nvr; + delete nvp; + delete inRingBuffer; + delete outRingBuffer; + delete fifow; if (kfa_table) { while(! kfa_table->isEmpty()) Index: programs/mythcommflag/TemplateFinder.cpp =================================================================== --- programs/mythcommflag/TemplateFinder.cpp (revision 13705) +++ programs/mythcommflag/TemplateFinder.cpp (working copy) @@ -764,8 +764,7 @@ TemplateFinder::~TemplateFinder(void) { - if (scores) - delete []scores; + delete []scores; avpicture_free(&tmpl); avpicture_free(&cropped); } Index: programs/mythcommflag/HistogramAnalyzer.cpp =================================================================== --- programs/mythcommflag/HistogramAnalyzer.cpp (revision 13705) +++ programs/mythcommflag/HistogramAnalyzer.cpp (working copy) @@ -171,26 +171,16 @@ HistogramAnalyzer::~HistogramAnalyzer(void) { - if (monochromatic) - delete []monochromatic; - if (mean) - delete []mean; - if (median) - delete []median; - if (stddev) - delete []stddev; - if (frow) - delete []frow; - if (fcol) - delete []fcol; - if (fwidth) - delete []fwidth; - if (fheight) - delete []fheight; - if (histogram) - delete []histogram; - if (buf) - delete []buf; + delete []monochromatic; + delete []mean; + delete []median; + delete []stddev; + delete []frow; + delete []fcol; + delete []fwidth; + delete []fheight; + delete []histogram; + delete []buf; } enum FrameAnalyzer::analyzeFrameResult Index: programs/mythcommflag/ClassicLogoDetector.cpp =================================================================== --- programs/mythcommflag/ClassicLogoDetector.cpp (revision 13705) +++ programs/mythcommflag/ClassicLogoDetector.cpp (working copy) @@ -62,20 +62,13 @@ ClassicLogoDetector::~ClassicLogoDetector() { commDetector = 0; - if (edgeMask) - delete [] edgeMask; - if (logoFrame) - delete [] logoFrame; - if (logoMask) - delete [] logoMask; - if (logoCheckMask) - delete [] logoCheckMask; - if (logoMaxValues) - delete [] logoMaxValues; - if (logoMinValues) - delete [] logoMinValues; - if (tmpBuf) - delete [] tmpBuf; + delete [] edgeMask; + delete [] logoFrame; + delete [] logoMask; + delete [] logoCheckMask; + delete [] logoMaxValues; + delete [] logoMinValues; + delete [] tmpBuf; } bool ClassicLogoDetector::searchForLogo(NuppelVideoPlayer* nvp) Index: programs/mythcommflag/SceneChangeDetector.cpp =================================================================== --- programs/mythcommflag/SceneChangeDetector.cpp (revision 13705) +++ programs/mythcommflag/SceneChangeDetector.cpp (working copy) @@ -122,10 +122,8 @@ SceneChangeDetector::~SceneChangeDetector(void) { - if (scdata) - delete []scdata; - if (scdiff) - delete []scdiff; + delete []scdata; + delete []scdiff; } enum FrameAnalyzer::analyzeFrameResult Index: programs/mythcommflag/TemplateMatcher.cpp =================================================================== --- programs/mythcommflag/TemplateMatcher.cpp (revision 13705) +++ programs/mythcommflag/TemplateMatcher.cpp (working copy) @@ -358,10 +358,8 @@ TemplateMatcher::~TemplateMatcher(void) { - if (matches) - delete []matches; - if (match) - delete []match; + delete []matches; + delete []match; avpicture_free(&cropped); } Index: programs/mythcommflag/ClassicCommDetector.cpp =================================================================== --- programs/mythcommflag/ClassicCommDetector.cpp (revision 13705) +++ programs/mythcommflag/ClassicCommDetector.cpp (working copy) @@ -185,11 +185,8 @@ ClassicCommDetector::~ClassicCommDetector() { - if (sceneChangeDetector) - delete sceneChangeDetector; - - if (logoDetector) - delete logoDetector; + delete sceneChangeDetector; + delete logoDetector; } bool ClassicCommDetector::go() Index: programs/mythcommflag/CannyEdgeDetector.cpp =================================================================== --- programs/mythcommflag/CannyEdgeDetector.cpp (revision 13705) +++ programs/mythcommflag/CannyEdgeDetector.cpp (working copy) @@ -60,12 +60,9 @@ avpicture_free(&convolved); avpicture_free(&s2); avpicture_free(&s1); - if (sgmsorted) - delete []sgmsorted; - if (sgm) - delete []sgm; - if (mask) - delete []mask; + delete []sgmsorted; + delete []sgm; + delete []mask; } int Index: programs/mythbackend/mythxml.cpp =================================================================== --- programs/mythbackend/mythxml.cpp (revision 13705) +++ programs/mythbackend/mythxml.cpp (working copy) @@ -1081,8 +1081,7 @@ delete pImage; - if (pInfo) - delete pInfo; + delete pInfo; pRequest->m_eResponseType = ResponseTypeFile; pRequest->m_nResponseStatus = 200; Index: programs/mythbackend/mediaserver.cpp =================================================================== --- programs/mythbackend/mediaserver.cpp (revision 13705) +++ programs/mythbackend/mediaserver.cpp (working copy) @@ -180,8 +180,7 @@ // gContext->removeListener(this); - if (m_pHttpServer) - delete m_pHttpServer; + delete m_pHttpServer; } ////////////////////////////////////////////////////////////////////////////// Index: programs/mythbackend/main.cpp =================================================================== --- programs/mythbackend/main.cpp (revision 13705) +++ programs/mythbackend/main.cpp (working copy) @@ -201,11 +201,9 @@ { delete gContext; - if (sched) - delete sched; + delete sched; - if (g_pUPnp) - delete g_pUPnp; + delete g_pUPnp; if (pidfile != "") unlink(pidfile.ascii()); Index: programs/mythbackend/filetransfer.cpp =================================================================== --- programs/mythbackend/filetransfer.cpp (revision 13705) +++ programs/mythbackend/filetransfer.cpp (working copy) @@ -48,8 +48,7 @@ { Stop(); - if (rbuffer) - delete rbuffer; + delete rbuffer; readthreadLock.unlock(); delete this; Index: programs/mythbackend/mainserver.cpp =================================================================== --- programs/mythbackend/mainserver.cpp (revision 13705) +++ programs/mythbackend/mainserver.cpp (working copy) @@ -218,11 +218,8 @@ MainServer::~MainServer() { delete mythserver; - - if (masterServerReconnect) - delete masterServerReconnect; - if (deferredDeleteTimer) - delete deferredDeleteTimer; + delete masterServerReconnect; + delete deferredDeleteTimer; } void MainServer::autoexpireUpdate(void) Index: programs/mythbackend/autoexpire.cpp =================================================================== --- programs/mythbackend/autoexpire.cpp (revision 13705) +++ programs/mythbackend/autoexpire.cpp (working copy) @@ -781,8 +781,7 @@ expireList.pop_back(); - if (deleteProg) - delete pginfo; + delete pginfo; } } Index: programs/mythtv/main.cpp =================================================================== --- programs/mythtv/main.cpp (revision 13705) +++ programs/mythtv/main.cpp (working copy) @@ -290,8 +290,7 @@ TV::StartTV(pginfo, false); - if (pginfo) - delete pginfo; + delete pginfo; if (priv_thread != 0) { Index: programs/mythlcdserver/lcdprocclient.cpp =================================================================== --- programs/mythlcdserver/lcdprocclient.cpp (revision 13705) +++ programs/mythlcdserver/lcdprocclient.cpp (working copy) @@ -2251,8 +2251,7 @@ lcd_ready = false; } - if (lcdMenuItems) - delete lcdMenuItems; + delete lcdMenuItems; gContext->removeListener(this); } Index: programs/mythwelcome/welcomedialog.cpp =================================================================== --- programs/mythwelcome/welcomedialog.cpp (revision 13705) +++ programs/mythwelcome/welcomedialog.cpp (working copy) @@ -298,14 +298,11 @@ { gContext->removeListener(this); - if (m_updateStatusTimer) - delete m_updateStatusTimer; + delete m_updateStatusTimer; - if (m_updateScreenTimer) - delete m_updateScreenTimer; + delete m_updateScreenTimer; - if (m_timeTimer) - delete m_timeTimer; + delete m_timeTimer; } void WelcomeDialog::updateTime(void)