aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2019-09-03 14:19:08 +0200
committerGitHub <noreply@github.com>2019-09-03 14:19:08 +0200
commit9d189629a9ed8ae919459382ce4dfcf806c395e7 (patch)
treeae65b4d575934bf467d1348580cbcc76fdbc4ecc
parent7405d260471212b58c517a9c06e58d2e3da1ad65 (diff)
parent46dd2c7f0e7674f0fb5ad02f5844304086f801d3 (diff)
Merge pull request #16563 from Rechi/modernize/readability-redundant-control-flow
[modernize] readability-redundant-control-flow
-rw-r--r--xbmc/ApplicationStackHelper.cpp1
-rw-r--r--xbmc/TextureDatabase.cpp2
-rw-r--r--xbmc/addons/interfaces/GUI/AddonCallbacksGUI.cpp6
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp1
-rw-r--r--xbmc/cores/AudioEngine/Interfaces/AE.h4
-rw-r--r--xbmc/cores/IPlayer.h4
-rw-r--r--xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp2
-rw-r--r--xbmc/cores/VideoPlayer/Edl.cpp1
-rw-r--r--xbmc/dialogs/GUIDialogKeyboardTouch.cpp1
-rw-r--r--xbmc/filesystem/DllLibCurl.cpp3
-rw-r--r--xbmc/filesystem/File.cpp2
-rw-r--r--xbmc/guilib/GUIVisualisationControl.cpp1
-rw-r--r--xbmc/guilib/GUIWindowManager.cpp1
-rw-r--r--xbmc/guilib/iimage.h2
-rw-r--r--xbmc/network/upnp/UPnPPlayer.cpp2
-rw-r--r--xbmc/pictures/SlideShowPicture.cpp1
-rw-r--r--xbmc/platform/posix/filesystem/SMBFile.cpp1
-rw-r--r--xbmc/pvr/windows/GUIWindowPVRChannels.cpp2
-rw-r--r--xbmc/utils/POUtils.cpp2
-rw-r--r--xbmc/utils/XSLTUtils.cpp1
-rw-r--r--xbmc/video/Teletext.cpp1
-rw-r--r--xbmc/view/GUIViewState.cpp1
-rw-r--r--xbmc/windowing/gbm/WinSystemGbmGLContext.h2
-rw-r--r--xbmc/windowing/gbm/WinSystemGbmGLESContext.h2
24 files changed, 7 insertions, 39 deletions
diff --git a/xbmc/ApplicationStackHelper.cpp b/xbmc/ApplicationStackHelper.cpp
index 3347c1043b..d6566b10b7 100644
--- a/xbmc/ApplicationStackHelper.cpp
+++ b/xbmc/ApplicationStackHelper.cpp
@@ -57,7 +57,6 @@ void CApplicationStackHelper::OnPlayBackStarted(const CFileItem& item)
}
}
}
- return;
}
bool CApplicationStackHelper::InitializeStack(const CFileItem & item)
diff --git a/xbmc/TextureDatabase.cpp b/xbmc/TextureDatabase.cpp
index b4ddcda58b..2d4bde85ea 100644
--- a/xbmc/TextureDatabase.cpp
+++ b/xbmc/TextureDatabase.cpp
@@ -457,7 +457,6 @@ void CTextureDatabase::SetTextureForPath(const std::string &url, const std::stri
{
CLog::Log(LOGERROR, "%s failed on url '%s'", __FUNCTION__, url.c_str());
}
- return;
}
void CTextureDatabase::ClearTextureForPath(const std::string &url, const std::string &type)
@@ -476,7 +475,6 @@ void CTextureDatabase::ClearTextureForPath(const std::string &url, const std::st
{
CLog::Log(LOGERROR, "%s failed on url '%s'", __FUNCTION__, url.c_str());
}
- return;
}
CDatabaseQueryRule *CTextureDatabase::CreateRule() const
diff --git a/xbmc/addons/interfaces/GUI/AddonCallbacksGUI.cpp b/xbmc/addons/interfaces/GUI/AddonCallbacksGUI.cpp
index e0a744e868..32acff70e0 100644
--- a/xbmc/addons/interfaces/GUI/AddonCallbacksGUI.cpp
+++ b/xbmc/addons/interfaces/GUI/AddonCallbacksGUI.cpp
@@ -811,8 +811,6 @@ void CAddonCallbacksGUI::Window_ClearList(void *addonData, GUIHANDLE handle)
Lock();
pAddonWindow->ClearList();
Unlock();
-
- return;
}
GUIHANDLE CAddonCallbacksGUI::Window_AddItem(void *addonData, GUIHANDLE handle, GUIHANDLE item, int itemPosition)
@@ -856,8 +854,6 @@ void CAddonCallbacksGUI::Window_RemoveItem(void *addonData, GUIHANDLE handle, in
Lock();
pAddonWindow->RemoveItem(itemPosition);
Unlock();
-
- return;
}
GUIHANDLE CAddonCallbacksGUI::Window_GetListItem(void *addonData, GUIHANDLE handle, int listPos)
@@ -893,8 +889,6 @@ void CAddonCallbacksGUI::Window_SetCurrentListPosition(void *addonData, GUIHANDL
Lock();
pAddonWindow->SetCurrentListPosition(listPos);
Unlock();
-
- return;
}
int CAddonCallbacksGUI::Window_GetCurrentListPosition(void *addonData, GUIHANDLE handle)
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp
index ffe8fec4e0..d844f49bab 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp
@@ -749,7 +749,6 @@ void CActiveAESink::GetDeviceFriendlyName(std::string &device)
}
}
}
- return;
}
void CActiveAESink::OpenSink()
diff --git a/xbmc/cores/AudioEngine/Interfaces/AE.h b/xbmc/cores/AudioEngine/Interfaces/AE.h
index ee3311905e..d6b08ed5ed 100644
--- a/xbmc/cores/AudioEngine/Interfaces/AE.h
+++ b/xbmc/cores/AudioEngine/Interfaces/AE.h
@@ -215,12 +215,12 @@ public:
* Instruct AE to keep configuration for a specified time
* @param millis time for which old configuration should be kept
*/
- virtual void KeepConfiguration(unsigned int millis) {return; }
+ virtual void KeepConfiguration(unsigned int millis) {}
/**
* Instruct AE to re-initialize, e.g. after ELD change event
*/
- virtual void DeviceChange() {return; }
+ virtual void DeviceChange() {}
/**
* Get the current sink data format
diff --git a/xbmc/cores/IPlayer.h b/xbmc/cores/IPlayer.h
index 1d718e1a06..efe3e3407f 100644
--- a/xbmc/cores/IPlayer.h
+++ b/xbmc/cores/IPlayer.h
@@ -110,7 +110,7 @@ public:
virtual void SetVolume(float volume){}
virtual void SetDynamicRangeCompression(long drc){}
- virtual void SetAVDelay(float fValue = 0.0f) { return; }
+ virtual void SetAVDelay(float fValue = 0.0f) {}
virtual float GetAVDelay() { return 0.0f;};
virtual void SetSubTitleDelay(float fValue = 0.0f){};
@@ -149,7 +149,7 @@ public:
virtual int GetChapterCount() { return 0; }
virtual int GetChapter() { return -1; }
- virtual void GetChapterName(std::string& strChapterName, int chapterIdx = -1) { return; }
+ virtual void GetChapterName(std::string& strChapterName, int chapterIdx = -1) {}
virtual int64_t GetChapterPos(int chapterIdx=-1) { return 0; }
virtual int SeekChapter(int iChapter) { return -1; }
// virtual bool GetChapterInfo(int chapter, SChapterInfo &info) { return false; }
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
index 28ca4e3c35..f6f0a574bc 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
@@ -1422,8 +1422,6 @@ void CDVDVideoCodecAndroidMediaCodec::InitSurfaceTexture(void)
// wait for it.
CApplicationMessenger::GetInstance().SendMsg(TMSG_CALLBACK, -1, -1, static_cast<void*>(&callbackData));
}
-
- return;
}
void CDVDVideoCodecAndroidMediaCodec::ReleaseSurfaceTexture(void)
diff --git a/xbmc/cores/VideoPlayer/Edl.cpp b/xbmc/cores/VideoPlayer/Edl.cpp
index 45250d51ac..3355c2bdf1 100644
--- a/xbmc/cores/VideoPlayer/Edl.cpp
+++ b/xbmc/cores/VideoPlayer/Edl.cpp
@@ -1049,5 +1049,4 @@ void CEdl::MergeShortCommBreaks()
AddSceneMarker(m_vecCuts[i].end);
}
}
- return;
}
diff --git a/xbmc/dialogs/GUIDialogKeyboardTouch.cpp b/xbmc/dialogs/GUIDialogKeyboardTouch.cpp
index 98c1c55c01..a05999d00d 100644
--- a/xbmc/dialogs/GUIDialogKeyboardTouch.cpp
+++ b/xbmc/dialogs/GUIDialogKeyboardTouch.cpp
@@ -61,7 +61,6 @@ void CGUIDialogKeyboardTouch::Cancel()
{
if (m_keyboard)
m_keyboard->Cancel();
- return;
}
int CGUIDialogKeyboardTouch::GetWindowId() const
diff --git a/xbmc/filesystem/DllLibCurl.cpp b/xbmc/filesystem/DllLibCurl.cpp
index 615ddbb9cc..203263602d 100644
--- a/xbmc/filesystem/DllLibCurl.cpp
+++ b/xbmc/filesystem/DllLibCurl.cpp
@@ -226,8 +226,6 @@ void DllLibCurlGlobal::easy_acquire(const char* protocol,
m_sessions.push_back(session);
CLog::Log(LOGINFO, "%s - Created session to %s://%s\n", __FUNCTION__, protocol, hostname);
-
- return;
}
void DllLibCurlGlobal::easy_release(CURL_HANDLE** easy_handle, CURLM** multi_handle)
@@ -312,6 +310,5 @@ void DllLibCurlGlobal::easy_duplicate(CURL_HANDLE* easy,
return;
}
}
- return;
}
} // namespace XCURL
diff --git a/xbmc/filesystem/File.cpp b/xbmc/filesystem/File.cpp
index a649ee65f0..a19b85f200 100644
--- a/xbmc/filesystem/File.cpp
+++ b/xbmc/filesystem/File.cpp
@@ -663,7 +663,6 @@ void CFile::Close()
{
CLog::Log(LOGERROR, "%s - Unhandled exception", __FUNCTION__);
}
- return;
}
void CFile::Flush()
@@ -678,7 +677,6 @@ void CFile::Flush()
{
CLog::Log(LOGERROR, "%s - Unhandled exception", __FUNCTION__);
}
- return;
}
//*********************************************************************************************
diff --git a/xbmc/guilib/GUIVisualisationControl.cpp b/xbmc/guilib/GUIVisualisationControl.cpp
index c1e114be52..1eccad219e 100644
--- a/xbmc/guilib/GUIVisualisationControl.cpp
+++ b/xbmc/guilib/GUIVisualisationControl.cpp
@@ -280,7 +280,6 @@ void CGUIVisualisationControl::OnAudioData(const float* audioData, unsigned int
{ // Transfer data to our visualisation
m_instance->AudioData(ptrAudioBuffer->Get(), ptrAudioBuffer->Size(), nullptr, 0);
}
- return;
}
void CGUIVisualisationControl::UpdateTrack()
diff --git a/xbmc/guilib/GUIWindowManager.cpp b/xbmc/guilib/GUIWindowManager.cpp
index b3f7013e4f..ddb923e456 100644
--- a/xbmc/guilib/GUIWindowManager.cpp
+++ b/xbmc/guilib/GUIWindowManager.cpp
@@ -716,7 +716,6 @@ void CGUIWindowManager::PreviousWindow()
pNewWindow->OnMessage(msg2);
CServiceBroker::GetGUI()->GetInfoManager().GetInfoProviders().GetGUIControlsInfoProvider().SetPreviousWindow(WINDOW_INVALID);
- return;
}
void CGUIWindowManager::ChangeActiveWindow(int newWindow, const std::string& strPath)
diff --git a/xbmc/guilib/iimage.h b/xbmc/guilib/iimage.h
index c54a242f29..299e74c6f2 100644
--- a/xbmc/guilib/iimage.h
+++ b/xbmc/guilib/iimage.h
@@ -53,7 +53,7 @@ public:
/*!
\brief Frees the output buffer allocated by CreateThumbnailFromSurface
*/
- virtual void ReleaseThumbnailBuffer() {return;}
+ virtual void ReleaseThumbnailBuffer() {}
unsigned int Width() const { return m_width; }
unsigned int Height() const { return m_height; }
diff --git a/xbmc/network/upnp/UPnPPlayer.cpp b/xbmc/network/upnp/UPnPPlayer.cpp
index 9c4eb63d06..c2f47c2b9c 100644
--- a/xbmc/network/upnp/UPnPPlayer.cpp
+++ b/xbmc/network/upnp/UPnPPlayer.cpp
@@ -466,7 +466,6 @@ void CUPnPPlayer::Pause()
return;
failed:
CLog::Log(LOGERROR, "UPNP: CUPnPPlayer::CloseFile - unable to pause/unpause playback");
- return;
}
void CUPnPPlayer::SeekTime(int64_t ms)
@@ -564,7 +563,6 @@ void CUPnPPlayer::SetVolume(float volume)
return;
failed:
CLog::Log(LOGERROR, "UPNP: CUPnPPlayer - unable to set volume");
- return;
}
int64_t CUPnPPlayer::GetTime()
diff --git a/xbmc/pictures/SlideShowPicture.cpp b/xbmc/pictures/SlideShowPicture.cpp
index 05848191d2..b6516ce9b8 100644
--- a/xbmc/pictures/SlideShowPicture.cpp
+++ b/xbmc/pictures/SlideShowPicture.cpp
@@ -222,7 +222,6 @@ void CSlideShowPic::SetTexture_Internal(int iSlideNumber, CBaseTexture* pTexture
m_bIsFinished = false;
m_bDrawNextImage = false;
m_bIsLoaded = true;
- return ;
}
void CSlideShowPic::SetOriginalSize(int iOriginalWidth, int iOriginalHeight, bool bFullSize)
diff --git a/xbmc/platform/posix/filesystem/SMBFile.cpp b/xbmc/platform/posix/filesystem/SMBFile.cpp
index abd75cabc7..13e48b6cef 100644
--- a/xbmc/platform/posix/filesystem/SMBFile.cpp
+++ b/xbmc/platform/posix/filesystem/SMBFile.cpp
@@ -39,7 +39,6 @@ void xb_smbc_log(const char* msg)
void xb_smbc_auth(const char *srv, const char *shr, char *wg, int wglen,
char *un, int unlen, char *pw, int pwlen)
{
- return ;
}
// WTF is this ?, we get the original server cache only
diff --git a/xbmc/pvr/windows/GUIWindowPVRChannels.cpp b/xbmc/pvr/windows/GUIWindowPVRChannels.cpp
index b97116fdf2..372045a6f7 100644
--- a/xbmc/pvr/windows/GUIWindowPVRChannels.cpp
+++ b/xbmc/pvr/windows/GUIWindowPVRChannels.cpp
@@ -316,8 +316,6 @@ void CGUIWindowPVRChannelsBase::ShowGroupManager(void)
pDlgInfo->SetRadio(m_bRadio);
pDlgInfo->Open();
-
- return;
}
void CGUIWindowPVRChannelsBase::OnInputDone()
diff --git a/xbmc/utils/POUtils.cpp b/xbmc/utils/POUtils.cpp
index 2b0c5d53c1..7d8afd3469 100644
--- a/xbmc/utils/POUtils.cpp
+++ b/xbmc/utils/POUtils.cpp
@@ -159,8 +159,6 @@ void CPODocument::ParseEntry(bool bisSourceLang)
"Failed entry: %s", m_Entry.Content.c_str());
m_Entry.msgStrPlural.resize(1); // Put 1 element with an empty string into the vector
}
-
- return;
}
const std::string& CPODocument::GetPlurMsgstr(size_t plural) const
diff --git a/xbmc/utils/XSLTUtils.cpp b/xbmc/utils/XSLTUtils.cpp
index 7a7a56dc90..b2ef27bdd2 100644
--- a/xbmc/utils/XSLTUtils.cpp
+++ b/xbmc/utils/XSLTUtils.cpp
@@ -23,7 +23,6 @@ void err(void *ctx, const char *msg, ...) {
vsnprintf(string, TMP_BUF_SIZE, msg, arg_ptr);
va_end(arg_ptr);
CLog::Log(LOGDEBUG, "XSLT: %s", string);
- return;
}
XSLTUtils::XSLTUtils()
diff --git a/xbmc/video/Teletext.cpp b/xbmc/video/Teletext.cpp
index 75289ae089..4cb852850d 100644
--- a/xbmc/video/Teletext.cpp
+++ b/xbmc/video/Teletext.cpp
@@ -719,7 +719,6 @@ void CTeletextDecoder::EndDecoder()
m_txtCache->PageUpdate = true;
CLog::Log(LOGDEBUG, "Teletext: Rendering ended");
}
- return;
}
void CTeletextDecoder::PageInput(int Number)
diff --git a/xbmc/view/GUIViewState.cpp b/xbmc/view/GUIViewState.cpp
index 6d01665cc3..47b0d664f5 100644
--- a/xbmc/view/GUIViewState.cpp
+++ b/xbmc/view/GUIViewState.cpp
@@ -271,7 +271,6 @@ void CGUIViewState::GetSortMethodLabelMasks(LABEL_MASKS& masks) const
masks.m_strLabel2File.clear();
masks.m_strLabelFolder.clear();
masks.m_strLabel2Folder.clear();
- return;
}
void CGUIViewState::AddSortMethod(SortBy sortBy, int buttonLabel, const LABEL_MASKS &labelMasks, SortAttribute sortAttributes /* = SortAttributeNone */, SortOrder sortOrder /* = SortOrderNone */)
diff --git a/xbmc/windowing/gbm/WinSystemGbmGLContext.h b/xbmc/windowing/gbm/WinSystemGbmGLContext.h
index 3c053d4005..f8ca053f2a 100644
--- a/xbmc/windowing/gbm/WinSystemGbmGLContext.h
+++ b/xbmc/windowing/gbm/WinSystemGbmGLContext.h
@@ -35,7 +35,7 @@ public:
bool SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool blankOtherDisplays) override;
void PresentRender(bool rendered, bool videoLayer) override;
protected:
- void SetVSyncImpl(bool enable) override { return; };
+ void SetVSyncImpl(bool enable) override {}
void PresentRenderImpl(bool rendered) override {};
bool CreateContext() override;
};
diff --git a/xbmc/windowing/gbm/WinSystemGbmGLESContext.h b/xbmc/windowing/gbm/WinSystemGbmGLESContext.h
index 7b4ac8443a..50a87c9827 100644
--- a/xbmc/windowing/gbm/WinSystemGbmGLESContext.h
+++ b/xbmc/windowing/gbm/WinSystemGbmGLESContext.h
@@ -35,7 +35,7 @@ public:
bool SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool blankOtherDisplays) override;
void PresentRender(bool rendered, bool videoLayer) override;
protected:
- void SetVSyncImpl(bool enable) override { return; };
+ void SetVSyncImpl(bool enable) override {}
void PresentRenderImpl(bool rendered) override {};
bool CreateContext() override;
};