changeset 724:7eb389da7976

Fix cppcheck warnings
author Chris Cannam
date Fri, 18 May 2012 09:48:19 +0100
parents 21d39720d5da
children c789deb83bd4 66c3f4e060e9
files plugin/DSSIPluginInstance.cpp plugin/LADSPAPluginInstance.cpp rdf/SimpleSPARQLQuery.h
diffstat 3 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/plugin/DSSIPluginInstance.cpp	Mon Mar 05 08:48:36 2012 +0000
+++ b/plugin/DSSIPluginInstance.cpp	Fri May 18 09:48:19 2012 +0100
@@ -455,12 +455,12 @@
 void
 DSSIPluginInstance::instantiate(unsigned long sampleRate)
 {
+    if (!m_descriptor) return;
+
 #ifdef DEBUG_DSSI
     std::cout << "DSSIPluginInstance::instantiate - plugin \"unique\" id = "
               << m_descriptor->LADSPA_Plugin->UniqueID << std::endl;
 #endif
-    if (!m_descriptor) return;
-
     const LADSPA_Descriptor *descriptor = m_descriptor->LADSPA_Plugin;
 
     if (!descriptor->instantiate) {
--- a/plugin/LADSPAPluginInstance.cpp	Mon Mar 05 08:48:36 2012 +0000
+++ b/plugin/LADSPAPluginInstance.cpp	Fri May 18 09:48:19 2012 +0100
@@ -379,11 +379,12 @@
 void
 LADSPAPluginInstance::instantiate(unsigned long sampleRate)
 {
+    if (!m_descriptor) return;
+
 #ifdef DEBUG_LADSPA
     std::cout << "LADSPAPluginInstance::instantiate - plugin unique id = "
               << m_descriptor->UniqueID << std::endl;
 #endif
-    if (!m_descriptor) return;
 
     if (!m_descriptor->instantiate) {
 	std::cerr << "Bad plugin: plugin id " << m_descriptor->UniqueID
--- a/rdf/SimpleSPARQLQuery.h	Mon Mar 05 08:48:36 2012 +0000
+++ b/rdf/SimpleSPARQLQuery.h	Fri May 18 09:48:19 2012 +0100
@@ -16,6 +16,8 @@
 #ifndef _SIMPLE_SPARQL_QUERY_H_
 #define _SIMPLE_SPARQL_QUERY_H_
 
+#ifdef NOT_DEFINED
+
 #include <QString>
 #include <map>
 #include <vector>
@@ -111,3 +113,5 @@
 };
 
 #endif
+
+#endif