aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guilib/D3DResource.h2
-rw-r--r--guilib/DDSImage.cpp3
-rw-r--r--guilib/GUIAudioManager.h1
-rw-r--r--guilib/GUIEditControl.cpp6
-rw-r--r--guilib/GUIFontTTF.cpp22
-rw-r--r--guilib/GUISpinControl.cpp1
-rw-r--r--guilib/GUITexture.cpp4
-rw-r--r--guilib/GUITexture.h2
-rw-r--r--guilib/GUIVisualisationControl.cpp4
-rw-r--r--guilib/GUIWindow.cpp2
10 files changed, 18 insertions, 29 deletions
diff --git a/guilib/D3DResource.h b/guilib/D3DResource.h
index 3267bcd09e..36caae5033 100644
--- a/guilib/D3DResource.h
+++ b/guilib/D3DResource.h
@@ -27,6 +27,8 @@
class ID3DResource
{
public:
+ virtual ~ID3DResource() {};
+
virtual void OnDestroyDevice()=0;
virtual void OnCreateDevice()=0;
virtual void OnLostDevice() {};
diff --git a/guilib/DDSImage.cpp b/guilib/DDSImage.cpp
index 80cc413f29..f260606b26 100644
--- a/guilib/DDSImage.cpp
+++ b/guilib/DDSImage.cpp
@@ -53,8 +53,7 @@ CDDSImage::CDDSImage(unsigned int width, unsigned int height, unsigned int forma
CDDSImage::~CDDSImage()
{
- if (m_data)
- delete[] m_data;
+ delete[] m_data;
}
unsigned int CDDSImage::GetWidth() const
diff --git a/guilib/GUIAudioManager.h b/guilib/GUIAudioManager.h
index afe15097f5..8866e36eb7 100644
--- a/guilib/GUIAudioManager.h
+++ b/guilib/GUIAudioManager.h
@@ -78,7 +78,6 @@ private:
pythonSoundsMap m_pythonSounds;
CStdString m_strMediaDir;
- bool m_bEnabled;
bool m_bInitialized;
CCriticalSection m_cs;
diff --git a/guilib/GUIEditControl.cpp b/guilib/GUIEditControl.cpp
index e18efff51c..9a3615bd47 100644
--- a/guilib/GUIEditControl.cpp
+++ b/guilib/GUIEditControl.cpp
@@ -527,14 +527,12 @@ void CGUIEditControl::OnPasteClipboard()
UpdateText();
}
#elif defined _WIN32
- HGLOBAL hglb;
- LPTSTR lptstr;
if (OpenClipboard(g_hWnd))
{
- hglb = GetClipboardData(CF_TEXT);
+ HGLOBAL hglb = GetClipboardData(CF_TEXT);
if (hglb != NULL)
{
- lptstr = (LPTSTR)GlobalLock(hglb);
+ LPTSTR lptstr = (LPTSTR)GlobalLock(hglb);
if (lptstr != NULL)
{
m_text2 = (char*)lptstr;
diff --git a/guilib/GUIFontTTF.cpp b/guilib/GUIFontTTF.cpp
index bdd72ce948..cc3931e2e7 100644
--- a/guilib/GUIFontTTF.cpp
+++ b/guilib/GUIFontTTF.cpp
@@ -165,16 +165,12 @@ void CGUIFontTTFBase::RemoveReference()
void CGUIFontTTFBase::ClearCharacterCache()
{
- if (m_texture)
- {
- delete(m_texture);
- }
+ delete(m_texture);
DeleteHardwareTexture();
m_texture = NULL;
- if (m_char)
- delete[] m_char;
+ delete[] m_char;
m_char = new Character[CHAR_CHUNK];
memset(m_charquick, 0, sizeof(m_charquick));
m_numChars = 0;
@@ -187,12 +183,9 @@ void CGUIFontTTFBase::ClearCharacterCache()
void CGUIFontTTFBase::Clear()
{
- if (m_texture)
- delete(m_texture);
-
+ delete(m_texture);
m_texture = NULL;
- if (m_char)
- delete[] m_char;
+ delete[] m_char;
memset(m_charquick, 0, sizeof(m_charquick));
m_char = NULL;
m_maxChars = 0;
@@ -246,12 +239,9 @@ bool CGUIFontTTFBase::Load(const CStdString& strFilename, float height, float as
m_height = height;
- if (m_texture)
- delete(m_texture);
-
+ delete(m_texture);
m_texture = NULL;
- if (m_char)
- delete[] m_char;
+ delete[] m_char;
m_char = NULL;
m_maxChars = 0;
diff --git a/guilib/GUISpinControl.cpp b/guilib/GUISpinControl.cpp
index 2f1e7aba27..151fde86b6 100644
--- a/guilib/GUISpinControl.cpp
+++ b/guilib/GUISpinControl.cpp
@@ -358,7 +358,6 @@ void CGUISpinControl::Render()
float posX = m_posX;
CStdString text;
- CStdStringW strTextUnicode;
if (m_iType == SPIN_CONTROL_TYPE_INT)
{
diff --git a/guilib/GUITexture.cpp b/guilib/GUITexture.cpp
index 654ed820d2..b3445fbd0f 100644
--- a/guilib/GUITexture.cpp
+++ b/guilib/GUITexture.cpp
@@ -40,13 +40,15 @@ CTextureInfo::CTextureInfo(const CStdString &file)
filename = file;
}
-void CTextureInfo::operator=(const CTextureInfo &right)
+CTextureInfo& CTextureInfo::operator=(const CTextureInfo &right)
{
border = right.border;
orientation = right.orientation;
diffuse = right.diffuse;
filename = right.filename;
useLarge = right.useLarge;
+
+ return *this;
}
CGUITextureBase::CGUITextureBase(float posX, float posY, float width, float height, const CTextureInfo& texture)
diff --git a/guilib/GUITexture.h b/guilib/GUITexture.h
index bdb760ff04..4fb9254f02 100644
--- a/guilib/GUITexture.h
+++ b/guilib/GUITexture.h
@@ -73,7 +73,7 @@ class CTextureInfo
public:
CTextureInfo();
CTextureInfo(const CStdString &file);
- void operator=(const CTextureInfo &right);
+ CTextureInfo& operator=(const CTextureInfo &right);
bool useLarge;
CRect border; // scaled - unneeded if we get rid of scale on load
int orientation; // orientation of the texture (0 - 7 == EXIForientation - 1)
diff --git a/guilib/GUIVisualisationControl.cpp b/guilib/GUIVisualisationControl.cpp
index 290b4eada6..8af58e1554 100644
--- a/guilib/GUIVisualisationControl.cpp
+++ b/guilib/GUIVisualisationControl.cpp
@@ -140,7 +140,7 @@ void CGUIVisualisationControl::LoadVisualisation()
return;
CVisualisationFactory factory;
- CStdString strVisz, strModule;
+ CStdString strVisz;
m_currentVis = g_guiSettings.GetString("musicplayer.visualisation");
if (m_currentVis.Equals("None"))
@@ -151,7 +151,7 @@ void CGUIVisualisationControl::LoadVisualisation()
int colonPos = m_currentVis.ReverseFind(":");
if ( colonPos > 0 )
{
- strModule = m_currentVis.Mid( colonPos+1 );
+ CStdString strModule = m_currentVis.Mid( colonPos+1 );
strVisz = m_currentVis.Mid( 0, colonPos );
m_pVisualisation = factory.LoadVisualisation(strVisz, strModule);
}
diff --git a/guilib/GUIWindow.cpp b/guilib/GUIWindow.cpp
index f35d6b64e5..cb334bee71 100644
--- a/guilib/GUIWindow.cpp
+++ b/guilib/GUIWindow.cpp
@@ -85,7 +85,7 @@ bool CGUIWindow::Load(const CStdString& strFileName, bool bContainsPath)
RESOLUTION resToUse = RES_INVALID;
CLog::Log(LOGINFO, "Loading skin file: %s", strFileName.c_str());
- TiXmlDocument xmlDoc;
+
// Find appropriate skin folder + resolution to load from
CStdString strPath;
CStdString strLowerPath;