[gstreamermm] Removed spaces between control statements and opening parenthesis.



commit 6430c89dc55348466231ad0d843e92ea771146c3
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Wed May 20 13:19:41 2009 -0400

    Removed spaces between control statements and opening parenthesis.
---
 ChangeLog                                          |   30 ++++++
 examples/media_player_gtkmm/main.cc                |    2 +-
 examples/media_player_gtkmm/player_window.cc       |    2 +-
 examples/ogg_player/main.cc                        |    8 +-
 examples/optiongroup/main.cc                       |    8 +-
 gstreamer/gstreamermm/wrap.cc                      |    2 +-
 tests/test-caps-structures.cc                      |    2 +-
 tests/test-caps.cc                                 |    8 +-
 tests/test-ghost-pad.cc                            |   14 ++--
 tests/test-init-check-noargs.cc                    |    6 +-
 tests/test-init-check.cc                           |    8 +-
 tests/test-init-noargs.cc                          |    2 +-
 tests/test-init.cc                                 |    4 +-
 tests/test-interface.cc                            |    2 +-
 tests/test-iterator.cc                             |   14 ++--
 tests/test-pad.cc                                  |   10 +-
 tests/test-pipeline-add-element.cc                 |    2 +-
 tests/test-plugin-gen.cc                           |    2 +-
 tests/test-plugin-signals.cc                       |    4 +-
 tests/test-property-caps.cc                        |    6 +-
 tests/test-structure.cc                            |    2 +-
 tests/test-taglist.cc                              |   10 +-
 tests/test-tagsetter.cc                            |    4 +-
 .../extra_defs_gen/generate_plugin_gmmproc_file.cc |  104 ++++++++++----------
 tools/extra_defs_gen/get_plugin_defs.cc            |    2 +-
 25 files changed, 144 insertions(+), 114 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8e674c6..e67aad2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+2009-05-20  José Alburquerque  <jaalburqu svn gnome org>
+
+	* examples/media_player_gtkmm/main.cc:
+	* examples/media_player_gtkmm/player_window.cc:
+	* examples/ogg_player/main.cc:
+	* examples/optiongroup/main.cc:
+	* gstreamer/gstreamermm/wrap.cc:
+	* tests/test-caps-structures.cc:
+	* tests/test-caps.cc:
+	* tests/test-ghost-pad.cc:
+	* tests/test-init-check-noargs.cc:
+	* tests/test-init-check.cc:
+	* tests/test-init-noargs.cc:
+	* tests/test-init.cc:
+	* tests/test-interface.cc:
+	* tests/test-iterator.cc:
+	* tests/test-pad.cc:
+	* tests/test-pipeline-add-element.cc:
+	* tests/test-plugin-gen.cc:
+	* tests/test-plugin-signals.cc:
+	* tests/test-property-caps.cc:
+	* tests/test-structure.cc:
+	* tests/test-taglist.cc:
+	* tests/test-tagsetter.cc:
+	* tools/extra_defs_gen/generate_plugin_gmmproc_file.cc:
+	* tools/extra_defs_gen/get_plugin_defs.cc:  Corrected coding style so
+	that there are no spaces between control statements and the opening
+	parenthesis.  It had been pointed out by a few of Murray's previous
+	commits, but I had not taken the time to correct them all.
+
 2009-05-19  José Alburquerque  <jaalburqu svn gnome org>
 
 	* gstreamer/src/audioclock.ccg:
diff --git a/examples/media_player_gtkmm/main.cc b/examples/media_player_gtkmm/main.cc
index 30fdb76..0ad6da6 100644
--- a/examples/media_player_gtkmm/main.cc
+++ b/examples/media_player_gtkmm/main.cc
@@ -50,7 +50,7 @@ main (int argc, char *argv[])
   // Create a video sink where video (if any) will be drawn:
   Glib::RefPtr<Gst::XImageSink> video_sink =
                         Gst::XImageSink::create("ximagesink");
-  if (!video_sink)
+  if(!video_sink)
   {
     std::cerr << "The ximagesink could not be created." << std::endl;
     return -1;
diff --git a/examples/media_player_gtkmm/player_window.cc b/examples/media_player_gtkmm/player_window.cc
index 070cec2..293acae 100644
--- a/examples/media_player_gtkmm/player_window.cc
+++ b/examples/media_player_gtkmm/player_window.cc
@@ -137,7 +137,7 @@ void PlayerWindow::on_bus_message_sync(
 bool PlayerWindow::on_bus_message(const Glib::RefPtr<Gst::Bus>& /* bus */,
           const Glib::RefPtr<Gst::Message>& message)
 {
-  switch (message->get_message_type())
+  switch(message->get_message_type())
   {
     case Gst::MESSAGE_EOS:
     {
diff --git a/examples/ogg_player/main.cc b/examples/ogg_player/main.cc
index b9aa337..92a2d3d 100644
--- a/examples/ogg_player/main.cc
+++ b/examples/ogg_player/main.cc
@@ -33,7 +33,7 @@ bool on_timeout()
 
   Glib::RefPtr<Gst::Query> query = Gst::QueryPosition::create(fmt);
 
-  if (pipeline->query(query)
+  if(pipeline->query(query)
     && pipeline->query_duration(fmt, len))
   {
     // Cast query's RefPtr to RefPtr<Gst::QueryPosition> to parse the
@@ -63,7 +63,7 @@ bool on_timeout()
 // This function is used to receive asynchronous messages in the main loop.
 bool on_bus_message(const Glib::RefPtr<Gst::Bus>& /* bus */, const Glib::RefPtr<Gst::Message>& message)
 {
-  switch (message->get_message_type()) {
+  switch(message->get_message_type()) {
     case Gst::MESSAGE_EOS:
       std::cout << std::endl << "End of stream" << std::endl;
       mainloop->quit();
@@ -124,7 +124,7 @@ int main(int argc, char* argv[])
   Gst::init(argc, argv);
 
   // Check input arguments:
-  if (argc < 2)
+  if(argc < 2)
   {
     std::cout << "Usage: " << argv[0] << " <Ogg/Vorbis filename>" << std::endl;
     return -1;
@@ -165,7 +165,7 @@ int main(int argc, char* argv[])
     std::cerr << "alsasink element could not be created." << std::endl;
 
   //Check that the elements were created:
-  if (!pipeline || !source || !parser || !decoder || !conv || !sink)
+  if(!pipeline || !source || !parser || !decoder || !conv || !sink)
   {
     std::cerr << "One element could not be created" << std::endl;
     return -1;
diff --git a/examples/optiongroup/main.cc b/examples/optiongroup/main.cc
index 0985b84..0459103 100644
--- a/examples/optiongroup/main.cc
+++ b/examples/optiongroup/main.cc
@@ -23,11 +23,11 @@ Glib::OptionEntry make_entry(const Glib::ustring& long_name, const gchar& short_
 {
   Glib::OptionEntry m_OptionEntry;
 
-  if (!long_name.empty())
+  if(!long_name.empty())
     m_OptionEntry.set_long_name(long_name);
-  if (short_name)
+  if(short_name)
     m_OptionEntry.set_short_name(short_name);
-  if (!description.empty())
+  if(!description.empty())
     m_OptionEntry.set_description(description);
 
   return m_OptionEntry;
@@ -46,7 +46,7 @@ int main(int argc, char** argv)
 
   // We must initialise the threading system before using any other GLib function.
   // See Gstreamer's documentation for more info.
-  if (!Glib::thread_supported ())
+  if(!Glib::thread_supported ())
     Glib::thread_init ();
 
   m_OptionContext.set_main_group(m_OptionGroup);
diff --git a/gstreamer/gstreamermm/wrap.cc b/gstreamer/gstreamermm/wrap.cc
index f4b6138..0346e54 100644
--- a/gstreamer/gstreamermm/wrap.cc
+++ b/gstreamer/gstreamermm/wrap.cc
@@ -121,7 +121,7 @@ static gboolean gtype_wraps_interface(GType implementer_type, GType interface_ty
   GType *ifaces = g_type_interfaces (implementer_type, &n_ifaces);
 
   gboolean found = false;
-  while (n_ifaces-- && !found)
+  while(n_ifaces-- && !found)
   {
     found = (ifaces[n_ifaces] == interface_type);
   }
diff --git a/tests/test-caps-structures.cc b/tests/test-caps-structures.cc
index ce73564..b3fd109 100644
--- a/tests/test-caps-structures.cc
+++ b/tests/test-caps-structures.cc
@@ -47,7 +47,7 @@ int main (int argc, char* argv[])
   Glib::RefPtr<Gst::Caps> caps = Gst::Caps::create();
   add_structures(caps);
 
-  for (int i = 0; i < 2; i++) {
+  for(int i = 0; i < 2; i++) {
     Glib::ustring str;
     const Gst::Structure s = caps->get_structure(i);
     if(s)
diff --git a/tests/test-caps.cc b/tests/test-caps.cc
index 3e27dc1..55a67d6 100644
--- a/tests/test-caps.cc
+++ b/tests/test-caps.cc
@@ -52,7 +52,7 @@ void test_simple()
   caps->set_simple("framerate", Gst::Fraction(25, 1));
   caps->set_simple("string", "A string");
 
-  if (caps->get_structure(0).get_field("width", width))
+  if(caps->get_structure(0).get_field("width", width))
   {
     std::cout << "Simple caps width after setting = " << width << "." <<
       std::endl;
@@ -60,7 +60,7 @@ void test_simple()
   else
     std::cout << "Getting of simple caps width field failed." << std::endl;
 
-  if (caps->get_structure(0).get_field("framerate", rate))
+  if(caps->get_structure(0).get_field("framerate", rate))
   {
     std::cout << "Simple caps rate after setting = " << rate.num << "/" <<
       rate.denom << "." << std::endl;
@@ -68,7 +68,7 @@ void test_simple()
   else
     std::cout << "Getting of simple caps framerate field failed." << std::endl;
 
-  if (caps->get_structure(0).get_field("string", string))
+  if(caps->get_structure(0).get_field("string", string))
   {
     std::cout << "Simple caps string after setting = '" << string << "'." <<
       std::endl;
@@ -93,7 +93,7 @@ int main (int argc, char* argv[])
 
   pipeline->add(e1)->add(e2);
 
-  if (!link_elements_with_filter(e1, e2))
+  if(!link_elements_with_filter(e1, e2))
     std::cerr << "Falied to link e1 and e2." << std::endl;
   else
     std::cerr << "Succeeded linking e1 and e2 with filter." << std::endl;
diff --git a/tests/test-ghost-pad.cc b/tests/test-ghost-pad.cc
index 457fa9a..a5f33a5 100644
--- a/tests/test-ghost-pad.cc
+++ b/tests/test-ghost-pad.cc
@@ -32,19 +32,19 @@ int main (int argc, char* argv[])
     Gst::PadTemplate::create("source-template", Gst::PAD_SINK, Gst::PAD_ALWAYS,
       caps);
 
-  if (templ)
+  if(templ)
     std::cout << "Successfully created pad template '" <<
       templ->get_name_template() << "'; direction = " << 
         templ->get_direction() << "." << std::endl;
 
   Glib::RefPtr<Gst::Pad> pad1 = Gst::Pad::create(Gst::PAD_SINK);
-  if (pad1)
+  if(pad1)
     std::cout << "Successfully created pad '" << pad1->get_name() <<
       "'; direction = " << pad1->get_direction() << "." << std::endl;
 
   Glib::RefPtr<Gst::Pad> pad2 = Gst::Pad::create(templ);
 
-  if (pad2)
+  if(pad2)
     std::cout << "Successfully created pad '" << pad2->get_name() <<
       "'; direction = " << pad2->get_direction() << "." << std::endl;
 
@@ -52,14 +52,14 @@ int main (int argc, char* argv[])
 // construction.
 /*
   Glib::RefPtr<Gst::GhostPad> gpad1 = Gst::GhostPad::create("gpad1", pad1);
-  if (gpad1)
+  if(gpad1)
     std::cout << "Successfully created pad '" << gpad1->get_name() <<
       "'; direction = " << gpad1->get_direction() << "." << std::endl;
 */
 
   Glib::RefPtr<Gst::GhostPad> gpad2 =
     Gst::GhostPad::create("gpad2", Gst::PAD_SRC);
-  if (gpad2)
+  if(gpad2)
     std::cout << "Successfully created pad '" << gpad2->get_name() <<
       "'; direction = " << gpad2->get_direction() << "." << std::endl;
 
@@ -68,14 +68,14 @@ int main (int argc, char* argv[])
 /*
   Glib::RefPtr<Gst::GhostPad> gpad3 =
     Gst::GhostPad::create("gpad3", pad1, templ);
-  if (gpad3)
+  if(gpad3)
     std::cout << "Successfully created pad '" << gpad3->get_name() <<
       "'; direction = " << gpad3->get_direction() << "." << std::endl;
 */
 
   Glib::RefPtr<Gst::GhostPad> gpad4 =
     Gst::GhostPad::create("gpad4", templ);
-  if (gpad4)
+  if(gpad4)
     std::cout << "Successfully created pad '" << gpad4->get_name() <<
       "'; direction = " << gpad4->get_direction() << "." << std::endl;
 
diff --git a/tests/test-init-check-noargs.cc b/tests/test-init-check-noargs.cc
index e09265b..9a1c084 100644
--- a/tests/test-init-check-noargs.cc
+++ b/tests/test-init-check-noargs.cc
@@ -26,14 +26,14 @@ int main (int argc, char* argv[])
   {
     bool success = Gst::init_check();
 
-    if (!success)
+    if(!success)
     {
       std::cout << "Error initializing gstreamermm." << std::endl;
       return -1;
     }
 
   }
-  catch (const Glib::Error& error)
+  catch(const Glib::Error& error)
   {
     std::cout << "Error initializing gstreamermm." << std::endl;
     return -1;
@@ -41,7 +41,7 @@ int main (int argc, char* argv[])
 
   Glib::RefPtr<Gst::Element> element = Gst::ElementFactory::create_element("ximagesink", "videosink");
 
-  if (element)
+  if(element)
     std::cout << "Successfully created gst element '" <<
       element->get_name() << "'." << std::endl;
 
diff --git a/tests/test-init-check.cc b/tests/test-init-check.cc
index 571a357..6d473ec 100644
--- a/tests/test-init-check.cc
+++ b/tests/test-init-check.cc
@@ -27,13 +27,13 @@ int main (int argc, char* argv[])
   {
     bool success = Gst::init_check(argc, argv);
 
-    if (!success)
+    if(!success)
     {
       std::cout << "Error initializing gstreamermm." << std::endl;
       return -1;
     }
   }
-  catch (const Glib::Error& error)
+  catch(const Glib::Error& error)
   {
     std::cout << "Error initializing gstreamermm." << std::endl;
     return -1;
@@ -41,7 +41,7 @@ int main (int argc, char* argv[])
 
   Glib::RefPtr<Gst::Element> element = Gst::ElementFactory::create_element("ximagesink", "videosink");
 
-  if (element)
+  if(element)
     std::cout << "Successfully created gst element '" <<
       element->get_name() << "'." << std::endl;
 
@@ -59,7 +59,7 @@ int main (int argc, char* argv[])
   GstClock* gst_clock = gst_audio_clock_new("clock", 0, 0);
   Glib::RefPtr<Gst::AudioClock> clock = Glib::wrap(GST_AUDIO_CLOCK(gst_clock));
 
-  if (clock)
+  if(clock)
     std::cout << "Successfully wrapped a GstAudioClock in a GSt::AudioClock." << std::endl;
   else
     std::cout << "Did not successfully wrap a GstAudioClock in a Gst::AudioClock." << std::endl;
diff --git a/tests/test-init-noargs.cc b/tests/test-init-noargs.cc
index a75b2be..2db898b 100644
--- a/tests/test-init-noargs.cc
+++ b/tests/test-init-noargs.cc
@@ -26,7 +26,7 @@ int main (int argc, char* argv[])
 
   Glib::RefPtr<Gst::Element> element = Gst::ElementFactory::create_element("ximagesink", "videosink");
 
-  if (element)
+  if(element)
     std::cout << "Successfully created gst element '" <<
       element->get_name() << "'." << std::endl;
 
diff --git a/tests/test-init.cc b/tests/test-init.cc
index e6a6feb..86dbed5 100644
--- a/tests/test-init.cc
+++ b/tests/test-init.cc
@@ -27,7 +27,7 @@ int main (int argc, char* argv[])
 
   Glib::RefPtr<Gst::Element> element = Gst::ElementFactory::create_element("ximagesink", "videosink");
 
-  if (element)
+  if(element)
     std::cout << "Successfully created gst element '" <<
       element->get_name() << "'." << std::endl;
 
@@ -45,7 +45,7 @@ int main (int argc, char* argv[])
   GstClock* gst_clock = gst_audio_clock_new("clock", 0, 0);
   Glib::RefPtr<Gst::AudioClock> clock = Glib::wrap(GST_AUDIO_CLOCK(gst_clock));
 
-  if (clock)
+  if(clock)
     std::cout << "Successfully wrapped a GstAudioClock in a GSt::AudioClock." << std::endl;
   else
     std::cout << "Did not successfully wrap a GstAudioClock in a Gst::AudioClock." << std::endl;
diff --git a/tests/test-interface.cc b/tests/test-interface.cc
index c64edd6..4df0f05 100644
--- a/tests/test-interface.cc
+++ b/tests/test-interface.cc
@@ -45,7 +45,7 @@ int main (int argc, char* argv[])
     const GstElement* constGstElement = handler->gobj();
     Glib::RefPtr<Gst::Element> element_copy = Glib::wrap(handler->gobj_copy());
 
-    if (!gstElement || !constGstElement || !element_copy)
+    if(!gstElement || !constGstElement || !element_copy)
     {
       std::cout << "Underlying gobject methods of cast object didn't work." <<
         std::endl;
diff --git a/tests/test-iterator.cc b/tests/test-iterator.cc
index 7b46645..6b8066c 100644
--- a/tests/test-iterator.cc
+++ b/tests/test-iterator.cc
@@ -49,23 +49,23 @@ int main (int argc, char* argv[])
 
   try
   {
-    for (elements.begin(); !elements.is_end(); ++elements, ++iterations)
+    for(elements.begin(); !elements.is_end(); ++elements, ++iterations)
     {
-      if (!firstIter)
+      if(!firstIter)
         firstIter = elements;
 
       std::cout << elements->get_name() << std::endl;
     }
 
-    if (firstIter)
+    if(firstIter)
       std::cout << "The first element iterator processed is '" << 
         firstIter->get_name() << "'." << std::endl;
 
-    if (elements)
+    if(elements)
       std::cout << "elements.is_end() == true && (elements) is valid." <<
         std::endl;
   }
-  catch (std::runtime_error& e)
+  catch(std::runtime_error& e)
   {
     std::cout << "Runtime error while iterating through \"" <<
       bin->get_name() << "'s\" elements:" << std::endl << e.what() << std::endl;
@@ -87,7 +87,7 @@ int main (int argc, char* argv[])
         "." << std::endl;
     }
   }
-  catch (std::runtime_error& e)
+  catch(std::runtime_error& e)
   {
     std::cout << "Runtime error while iterating through query types." <<
       std::endl << e.what() << std::endl;
@@ -106,7 +106,7 @@ int main (int argc, char* argv[])
         "." << std::endl;
     }
   }
-  catch (std::runtime_error& e)
+  catch(std::runtime_error& e)
   {
     std::cout << "Runtime error while iterating through formats." <<
       std::endl << e.what() << std::endl;
diff --git a/tests/test-pad.cc b/tests/test-pad.cc
index dfbb7d8..226489d 100644
--- a/tests/test-pad.cc
+++ b/tests/test-pad.cc
@@ -32,32 +32,32 @@ int main (int argc, char* argv[])
     Gst::PadTemplate::create("source-template", Gst::PAD_SINK, Gst::PAD_ALWAYS,
       caps);
 
-  if (templ)
+  if(templ)
     std::cout << "Successfully created pad template '" <<
       templ->get_name_template() << "'; direction = " << 
         templ->get_direction() << "." << std::endl;
 
   Glib::RefPtr<Gst::Pad> pad1 = Gst::Pad::create("pad1", Gst::PAD_SINK);
 
-  if (pad1)
+  if(pad1)
     std::cout << "Successfully created pad '" << pad1->get_name() <<
       "'; direction = " << pad1->get_direction() << "." << std::endl;
 
   Glib::RefPtr<Gst::Pad> pad2 = Gst::Pad::create(Gst::PAD_SINK);
 
-  if (pad2)
+  if(pad2)
     std::cout << "Successfully created pad '" << pad2->get_name() <<
       "'; direction = " << pad2->get_direction() << "." << std::endl;
 
   Glib::RefPtr<Gst::Pad> pad3 = Gst::Pad::create(templ, "pad3");
 
-  if (pad3)
+  if(pad3)
     std::cout << "Successfully created pad '" << pad3->get_name() <<
       "'; direction = " << pad3->get_direction() << "." << std::endl;
 
   Glib::RefPtr<Gst::Pad> pad4 = Gst::Pad::create(templ);
 
-  if (pad4)
+  if(pad4)
     std::cout << "Successfully created pad '" << pad4->get_name() <<
       "'; direction = " << pad4->get_direction() << "." << std::endl;
 
diff --git a/tests/test-pipeline-add-element.cc b/tests/test-pipeline-add-element.cc
index c679736..7071961 100644
--- a/tests/test-pipeline-add-element.cc
+++ b/tests/test-pipeline-add-element.cc
@@ -31,7 +31,7 @@ int main (int argc, char* argv[])
 
   Glib::RefPtr<Gst::Element> sourceCopy = pipeline->get_element("source");
 
-  if (sourceCopy)
+  if(sourceCopy)
     std::cout << "Successfully added element '" << sourceCopy->get_name() <<
      "' to pipeline '" << pipeline->get_name() << "'." << std::endl;
 
diff --git a/tests/test-plugin-gen.cc b/tests/test-plugin-gen.cc
index b23899f..835741d 100644
--- a/tests/test-plugin-gen.cc
+++ b/tests/test-plugin-gen.cc
@@ -30,7 +30,7 @@ int main(int argc, char* argv[])
 
   Glib::RefPtr<Gst::FileSrc> filesrc = Gst::FileSrc::create();
 
-  if (filesrc)
+  if(filesrc)
     std::cout << "filesrc is valid." << std::endl;
   else
     std::cout << "filesrc is invalid." << std::endl;
diff --git a/tests/test-plugin-signals.cc b/tests/test-plugin-signals.cc
index d5784e1..b6f773c 100644
--- a/tests/test-plugin-signals.cc
+++ b/tests/test-plugin-signals.cc
@@ -27,7 +27,7 @@ Glib::RefPtr<Glib::MainLoop> mainloop;
 // This function is used to receive asynchronous messages in the main loop.
 bool on_bus_message(const Glib::RefPtr<Gst::Bus>& /* bus */, const Glib::RefPtr<Gst::Message>& message)
 {
-  switch (message->get_message_type()) {
+  switch(message->get_message_type()) {
     case Gst::MESSAGE_EOS:
       std::cout << "End of stream." << std::endl;
       mainloop->quit();
@@ -74,7 +74,7 @@ int main(int argc, char* argv[])
   Glib::RefPtr<Gst::FakeSrc> source = Gst::FakeSrc::create();
   Glib::RefPtr<Gst::FakeSink> sink = Gst::FakeSink::create();
 
-  if (!pipeline || !source || !sink) {
+  if(!pipeline || !source || !sink) {
     std::cerr << "One element could not be created" << std::endl;
     return -1;
   }
diff --git a/tests/test-property-caps.cc b/tests/test-property-caps.cc
index 747e450..6cbc485 100644
--- a/tests/test-property-caps.cc
+++ b/tests/test-property-caps.cc
@@ -28,7 +28,7 @@ main(int argc, char* argv[])
   Glib::RefPtr<Gst::Element> source = 
           Gst::ElementFactory::create_element("multifilesrc", "source");
 
-  if (!source)
+  if(!source)
   {
     std::cout << "Could not create `multifilesrc' element.  Exiting." <<
       std::endl;
@@ -40,7 +40,7 @@ main(int argc, char* argv[])
 
   source->get_property("caps", caps);
 
-  if (!caps)
+  if(!caps)
     std::cout << "`caps' property is null before setting property." <<
       std::endl;
 
@@ -48,7 +48,7 @@ main(int argc, char* argv[])
 
   source->get_property("caps", caps);
 
-  if (caps)
+  if(caps)
     std::cout << "`caps' property after setting and getting is '" <<
       caps->to_string() << "'." << std::endl;
 
diff --git a/tests/test-structure.cc b/tests/test-structure.cc
index 15d24ae..09b8a14 100644
--- a/tests/test-structure.cc
+++ b/tests/test-structure.cc
@@ -65,7 +65,7 @@ int main (int argc, char* argv[])
 
   int state;
   structure.get_field("state", Glib::Value<Gst::State>::value_type(), state);
-  if ((state = Gst::STATE_PAUSED))
+  if((state = Gst::STATE_PAUSED))
     std::cout << "state value after getting = Gst::STATE_PAUSED." <<
       std::endl;
 
diff --git a/tests/test-taglist.cc b/tests/test-taglist.cc
index e4100be..35cd6ee 100644
--- a/tests/test-taglist.cc
+++ b/tests/test-taglist.cc
@@ -26,7 +26,7 @@ int main (int argc, char* argv[])
 
   Gst::TagList taglist;
 
-  if (taglist)
+  if(taglist)
   {
     std::cout << "TagList is invalid.  Exiting." << std::endl;
     exit(1);
@@ -38,25 +38,25 @@ int main (int argc, char* argv[])
   taglist.add(Gst::Tag::DATE, Glib::Date(5, Glib::Date::NOVEMBER, 2008));
 
   Glib::ustring title;
-  if (taglist.get(Gst::Tag::TITLE, title))
+  if(taglist.get(Gst::Tag::TITLE, title))
     std::cout << "Tag title is '" << title << "'." << std::endl;
   else
     std::cout << "Could not get tag `" << Gst::Tag::TITLE << "'." << std::endl;
 
   Glib::ustring artist;
-  if (taglist.get(Gst::Tag::ARTIST, artist))
+  if(taglist.get(Gst::Tag::ARTIST, artist))
     std::cout << "Tag artist is '" << artist << "'." << std::endl;
   else
     std::cout << "Could not get tag `" << Gst::Tag::ARTIST << "'." << std::endl;
 
   guint rate;
-  if (taglist.get(Gst::Tag::BITRATE, 0, rate))
+  if(taglist.get(Gst::Tag::BITRATE, 0, rate))
     std::cout << "Tag bit-rate is " << rate << "." << std::endl;
   else
     std::cout << "Could not get tag " << Gst::Tag::BITRATE << "." << std::endl;
 
   Glib::Date date;
-  if (taglist.get(Gst::Tag::DATE, date))
+  if(taglist.get(Gst::Tag::DATE, date))
     std::cout << "Tag date is " << date.get_year() << "-" <<
       date.get_month() << "-" << (int) date.get_day() << "." << std::endl;
   else
diff --git a/tests/test-tagsetter.cc b/tests/test-tagsetter.cc
index 437ffa1..e65ee86 100644
--- a/tests/test-tagsetter.cc
+++ b/tests/test-tagsetter.cc
@@ -26,7 +26,7 @@ int main (int argc, char* argv[])
   
   Glib::RefPtr<Gst::Element> vorbisenc = Gst::ElementFactory::create_element("vorbisenc");
 
-  if (!vorbisenc)
+  if(!vorbisenc)
   {
     std::cout << "Failed to create vorbisenc element." << std::endl;
     exit(1);
@@ -35,7 +35,7 @@ int main (int argc, char* argv[])
   Glib::RefPtr< Gst::ElementInterfaced<Gst::TagSetter> > setter =
     Gst::Interface::cast<Gst::TagSetter>(vorbisenc);
 
-  if (!setter)
+  if(!setter)
   {
     std::cout << "Failed to cast vorbisenc element to Gst::TagSetter." <<
       std::endl;
diff --git a/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc b/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
index b2a53b4..74419d0 100644
--- a/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
+++ b/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
@@ -125,12 +125,12 @@ Glib::ustring get_cast_macro(const Glib::ustring& typeName)
   bool prev_is_lower = true;  // Going backwards so last char should be lower.
   int underscore_char_count = 0; // Used to count characters between underscores.
 
-  for (--iter; iter != typeName.begin(); --iter, ++underscore_char_count)
+  for(--iter; iter != typeName.begin(); --iter, ++underscore_char_count)
   {
-    if (g_unichar_isupper(*iter))
+    if(g_unichar_isupper(*iter))
     {
       result.insert(0, 1, *iter);
-      if (prev_is_lower && underscore_char_count > 1)
+      if(prev_is_lower && underscore_char_count > 1)
       {
         result.insert(0, 1, '_');
         underscore_char_count = 0;
@@ -140,7 +140,7 @@ Glib::ustring get_cast_macro(const Glib::ustring& typeName)
     }
     else
     {
-      if (prev_is_upper && underscore_char_count > 1)
+      if(prev_is_upper && underscore_char_count > 1)
       {
         result.insert(0, 1, '_');
         underscore_char_count = 0;
@@ -159,10 +159,10 @@ Glib::ustring get_cast_macro(const Glib::ustring& typeName)
 
 bool is_wrapped_enum(const Glib::ustring& cTypeName)
 {
-  for (int i = 0; i < WRAPPED_ENUMS_SIZE &&
+  for(int i = 0; i < WRAPPED_ENUMS_SIZE &&
     cTypeName.compare(wrappedEnums[i]) >= 0; i++)
   {
-    if (cTypeName.compare(wrappedEnums[i]) == 0)
+    if(cTypeName.compare(wrappedEnums[i]) == 0)
       return true;
   }
 
@@ -171,10 +171,10 @@ bool is_wrapped_enum(const Glib::ustring& cTypeName)
 
 bool is_wrapped_base_class(const Glib::ustring& cTypeName)
 {
-  for (int i = 0; i < WRAPPED_BASE_CLASSES_SIZE &&
+  for(int i = 0; i < WRAPPED_BASE_CLASSES_SIZE &&
     cTypeName.compare(wrappedBaseClasses[i]) >= 0; i++)
   {
-    if (cTypeName.compare(wrappedBaseClasses[i]) == 0)
+    if(cTypeName.compare(wrappedBaseClasses[i]) == 0)
       return true;
   }
 
@@ -188,7 +188,7 @@ bool is_plugin(const Glib::ustring& cTypeName)
 
   bool const result = (fact != 0);
 
-  if (fact)
+  if(fact)
     g_object_unref(fact);
 
   return result;
@@ -207,7 +207,7 @@ void get_property_wrap_statements(Glib::ustring& wrapStatements,
     ppParamSpec = g_object_class_list_properties (pGClass, &iCount);
     g_type_class_unref(pGClass);
   }
-  else if (G_TYPE_IS_INTERFACE(type))
+  else if(G_TYPE_IS_INTERFACE(type))
   {
     gpointer pGInterface = g_type_default_interface_ref(type);
     if(pGInterface) //We check because this fails for G_TYPE_VOLUME, for some reason.
@@ -229,7 +229,7 @@ void get_property_wrap_statements(Glib::ustring& wrapStatements,
       GType propertyGType = pParamSpec->value_type;
       GType ownerGType = pParamSpec->owner_type;
 
-      if (ownerGType == type)
+      if(ownerGType == type)
       {
         //Name and type:
         Glib::ustring propertyName = g_param_spec_get_name(pParamSpec);
@@ -239,7 +239,7 @@ void get_property_wrap_statements(Glib::ustring& wrapStatements,
 
         bool enumIsWrapped = false;
 
-        if ((G_TYPE_IS_ENUM(propertyGType) || G_TYPE_IS_FLAGS(propertyGType)) &&
+        if((G_TYPE_IS_ENUM(propertyGType) || G_TYPE_IS_FLAGS(propertyGType)) &&
           !(enumIsWrapped = is_wrapped_enum(propertyCType)))
         {
           Glib::ustring propertyCppType = propertyCType.substr(3);
@@ -264,7 +264,7 @@ void get_property_wrap_statements(Glib::ustring& wrapStatements,
         wrapStatements += "  _WRAP_PROPERTY(\"" + propertyName + "\", " +
           "_CCONVERT(" + propertyCType + ", `return'))\n";
 
-        if (!G_TYPE_IS_ENUM(propertyGType) || enumIsWrapped)
+        if(!G_TYPE_IS_ENUM(propertyGType) || enumIsWrapped)
           includeMacroCalls += "_CCONVERSION_INCLUDE(" + propertyCType + ")dnl\n";
       }
     }
@@ -277,10 +277,10 @@ Glib::ustring get_method_name(const Glib::ustring& signalName)
 {
   Glib::ustring result;
 
-  for (Glib::ustring::const_iterator iter = signalName.begin();
+  for(Glib::ustring::const_iterator iter = signalName.begin();
     iter != signalName.end(); ++iter)
   {
-    if ((*iter) == '-')
+    if((*iter) == '-')
     {
       result.push_back('_');
     }
@@ -304,7 +304,7 @@ void get_signal_wrap_statements(Glib::ustring& wrapStatements,
 
   //Get the list of signals:
   guint iCount = 0;
-  guint* pIDs = g_signal_list_ids (type, &iCount);
+  guint* pIDs = g_signal_list_ids(type, &iCount);
 
   //Loop through the list of signals:
   if(pIDs)
@@ -330,9 +330,9 @@ void get_signal_wrap_statements(Glib::ustring& wrapStatements,
       Glib::ustring  returnCType = g_type_name(returnGType) +
         (Glib::ustring) (gst_type_is_a_pointer(returnGType) ?  "*" : "");
 
-      if (gst_type_is_a_pointer(returnGType))
+      if(gst_type_is_a_pointer(returnGType))
       {
-        if (g_type_is_a(returnGType, G_TYPE_BOXED))
+        if(g_type_is_a(returnGType, G_TYPE_BOXED))
         // Boxed type returns for signals need special conversions because
         // when unwrapping them, gobj_copy() should be used instead of just
         // gobj() to guard against losing the original with a temporary
@@ -345,7 +345,7 @@ void get_signal_wrap_statements(Glib::ustring& wrapStatements,
 
           // Also include a wrapping conversion:
 
-          if (returnGType == GST_TYPE_TAG_LIST)
+          if(returnGType == GST_TYPE_TAG_LIST)
           // Dealing with a GstTagList* return which has a special Glib::wrap()
           // because of the conflict with the Glib::wrap() for GstStructure*
           // (GstTagList is infact a GstStructure).
@@ -407,9 +407,9 @@ void get_signal_wrap_statements(Glib::ustring& wrapStatements,
           // conversions will already probably be defined in the global convert
           // file):
 
-          if (gst_type_is_a_pointer(paramGType))
+          if(gst_type_is_a_pointer(paramGType))
           {
-            if (paramGType == GST_TYPE_TAG_LIST)
+            if(paramGType == GST_TYPE_TAG_LIST)
             // Dealing with a GstTagList* which has a special Glib::wrap()
             // because of the conflict with the Glib::wrap() for GstStructure*
             // (GstTagList is in fact a GstStructure).
@@ -433,7 +433,7 @@ void get_signal_wrap_statements(Glib::ustring& wrapStatements,
 
           cClassSignalDeclarations += ", " + paramCType + " " + paramName;
 
-          if (i < signalQuery.n_params - 1)
+          if(i < signalQuery.n_params - 1)
             wrapStatement += ", ";
         }
       }
@@ -462,16 +462,16 @@ void get_interface_macros(Glib::ustring& interfaceMacros,
 
   GType parent_type = g_type_parent(type);
 
-  for (guint i = 0; i < n_interfaces; i++)
+  for(guint i = 0; i < n_interfaces; i++)
   {
-    if (!g_type_is_a(parent_type, interfaces[i]))
+    if(!g_type_is_a(parent_type, interfaces[i]))
     {
       Glib::ustring  interfaceCType = g_type_name(interfaces[i]) +
         (Glib::ustring) "*";
 
       cppExtends += "public _CCONVERT(`" + interfaceCType + "',`type')";
 
-      if (i < n_interfaces - 1)
+      if(i < n_interfaces - 1)
         cppExtends += ", ";
 
       interfaceMacros += "  _IMPLEMENTS_INTERFACE(_CCONVERT(`" +
@@ -504,7 +504,7 @@ void generate_hg_file(const Glib::ustring& includeMacroCalls,
   std::cout << "namespace " << nmspace << std::endl;
   std::cout << "{" << std::endl << std::endl;
 
-  if (!enumWrapStatements.empty())
+  if(!enumWrapStatements.empty())
     std::cout << enumWrapStatements << std::endl;
 
   std::cout << "/** " << nmspace << "::" << cppTypeName << " - " << pluginName << " plugin." << std::endl;
@@ -520,7 +520,7 @@ void generate_hg_file(const Glib::ustring& includeMacroCalls,
   std::cout << "class " << cppTypeName << std::endl;
   std::cout << ": public " << parentNameSpace << "::" << cppParentTypeName;
 
-  if (!cppExtends.empty())
+  if(!cppExtends.empty())
     std::cout << ", " << cppExtends;
   
   std::cout << std::endl;
@@ -530,7 +530,7 @@ void generate_hg_file(const Glib::ustring& includeMacroCalls,
     ", " << castMacro << ", " << parentNameSpace << "::" <<
     cppParentTypeName << ", " << cParentTypeName << ")" << std::endl;
 
-  if (!interfaceMacros.empty())
+  if(!interfaceMacros.empty())
     std::cout << interfaceMacros << std::endl;
 
   std::cout << "  _IS_GSTREAMERMM_PLUGIN" << std::endl << std::endl;
@@ -548,10 +548,10 @@ void generate_hg_file(const Glib::ustring& includeMacroCalls,
   std::cout << " */" << std::endl;
   std::cout << "  _WRAP_CREATE(const Glib::ustring& name)" << std::endl;
 
-  if (!propertyWrapStatements.empty())
+  if(!propertyWrapStatements.empty())
     std::cout << std::endl << propertyWrapStatements;
 
-  if (!signalWrapStatements.empty())
+  if(!signalWrapStatements.empty())
     std::cout << std::endl << signalWrapStatements;
 
   std::cout << "};" << std::endl;
@@ -566,7 +566,7 @@ void generate_ccg_file(const Glib::ustring& enumGTypeFunctionDefinitions,
     cppParentTypeName.lowercase() << "_p.h)" << std::endl << std::endl;
 
   //Only output ObjectClass with signal declarations if there are signals:
-  if (!cClassSignalDeclarations.empty())
+  if(!cClassSignalDeclarations.empty())
   {
     std::cout << "struct _" << cTypeName << "Class" << std::endl;
     std::cout << "{" << std::endl;
@@ -586,11 +586,11 @@ void generate_ccg_file(const Glib::ustring& enumGTypeFunctionDefinitions,
   std::cout << "  GstElementFactory* factory = 0;" << std::endl;
   std::cout << "  GstPluginFeature* feature = 0;" << std::endl << std::endl;
 
-  std::cout << "  if (!type)" << std::endl; std::cout << "  {" << std::endl;
+  std::cout << "  if(!type)" << std::endl; std::cout << "  {" << std::endl;
   std::cout << "    factory = gst_element_factory_find(\"" << pluginName << "\");" << std::endl;
 
   std::cout << "    // Make sure that the feature is actually loaded:" << std::endl;
-  std::cout << "    if (factory)" << std::endl;
+  std::cout << "    if(factory)" << std::endl;
   std::cout << "    {" << std::endl;
   std::cout << "      feature =" << std::endl;
   std::cout << "        gst_plugin_feature_load(GST_PLUGIN_FEATURE(factory));" << std::endl << std::endl;
@@ -605,7 +605,7 @@ void generate_ccg_file(const Glib::ustring& enumGTypeFunctionDefinitions,
   std::cout << "  return type;" << std::endl;
   std::cout << "}" << std::endl;
 
-  if (!enumGTypeFunctionDefinitions.empty())
+  if(!enumGTypeFunctionDefinitions.empty())
     std::cout << enumGTypeFunctionDefinitions;
 
   std::cout << std::endl << "} // extern \"C\"" << std::endl << std::endl;
@@ -631,7 +631,7 @@ int main(int argc, char* argv[])
   gboolean ccgFile = false;
   gboolean confirmExistence = false;
 
-  if (!g_thread_supported())
+  if(!g_thread_supported())
     g_thread_init(0);
 
   GOptionEntry optionEntries[] =
@@ -661,14 +661,14 @@ int main(int argc, char* argv[])
 
   try
   {
-    if (!optionContext.parse(argc, argv))
+    if(!optionContext.parse(argc, argv))
     {
       std::cout << "Error parsing options and initializing.  Sorry." <<
         std::endl;
       return -1;
     }
   }
-  catch (Glib::OptionError& error)
+  catch(Glib::OptionError& error)
   {
       std::cout << "Error parsing options and initializing GStreamer." <<
         std::endl << "Run `" << argv[0] << " -?'  for a list of options." <<
@@ -676,9 +676,9 @@ int main(int argc, char* argv[])
       return -1;
   }
 
-  if (confirmExistence)
+  if(confirmExistence)
   {
-    if (argc != 2)
+    if(argc != 2)
     {
       std::cout << "A plugin name must be supplied to confirm plugin "
         "existence." << std::endl << "Run `" << argv[0] <<
@@ -686,7 +686,7 @@ int main(int argc, char* argv[])
       return -1;
     }
   }
-  else if (argc != 3)
+  else if(argc != 3)
   {
     std::cout << "A plugin name and C++ class name must be supplied to "
       "generate gmmproc files." << std::endl <<
@@ -696,7 +696,7 @@ int main(int argc, char* argv[])
 
   pluginName = argv[1];
 
-  if (!confirmExistence)
+  if(!confirmExistence)
     cppTypeName = argv[2];
 
   GstElementFactory* factory = 0;
@@ -704,7 +704,7 @@ int main(int argc, char* argv[])
   factory = gst_element_factory_find(pluginName.c_str());
 
   // Make sure that the feature is actually loaded:
-  if (factory)
+  if(factory)
   {
     GstPluginFeature* loaded_feature =
             gst_plugin_feature_load(GST_PLUGIN_FEATURE(factory));
@@ -714,12 +714,12 @@ int main(int argc, char* argv[])
     type = gst_element_factory_get_element_type(factory);
   }
 
-  if (type)
+  if(type)
   {
-    if (confirmExistence)
+    if(confirmExistence)
       return 0;
 
-    if (!nmspace || !defsFile || !target)
+    if(!nmspace || !defsFile || !target)
     {
       std::cout << "A namespace, a default defs file and a target directory "
         "must be supplied" << std::endl << "with the --namespace, --main-defs "
@@ -731,7 +731,7 @@ int main(int argc, char* argv[])
     cTypeName = g_type_name(type);
     cParentTypeName = g_type_name(g_type_parent(type));
 
-    while (!cParentTypeName.empty() &&
+    while(!cParentTypeName.empty() &&
       !is_wrapped_base_class(cParentTypeName) && !is_plugin(cParentTypeName))
     {
       cParentTypeName =
@@ -743,7 +743,7 @@ int main(int argc, char* argv[])
 
     // Check for gstreamermm base classes so that the Gst namespace and the
     // gstreamermm include directory is always used with them.
-    if (
+    if(
       cppParentTypeName.compare("AudioFilter") == 0 ||
       cppParentTypeName.compare("AudioSink") == 0 ||
       cppParentTypeName.compare("AudioSrc") == 0 ||
@@ -770,7 +770,7 @@ int main(int argc, char* argv[])
       parentNameSpace = nmspace;
     }
 
-    if (hgFile || ccgFile)
+    if(hgFile || ccgFile)
     {
       Glib::ustring propertyWrapStatements;
       Glib::ustring includeMacroCalls;
@@ -785,7 +785,7 @@ int main(int argc, char* argv[])
       get_signal_wrap_statements(signalWrapStatements, includeMacroCalls,
         cClassSignalDeclarations);
 
-      if (hgFile)
+      if(hgFile)
       {
         Glib::ustring interfaceMacros;
         Glib::ustring cppExtends;
@@ -805,10 +805,10 @@ int main(int argc, char* argv[])
   }
   else
   {
-    if (confirmExistence)
+    if(confirmExistence)
       return -1;
 
-    if (hgFile)
+    if(hgFile)
     {
       std::cout << "_DEFS(" << target << "," << defsFile << ")" <<
         std::endl << std::endl;
@@ -820,7 +820,7 @@ int main(int argc, char* argv[])
     }
   }
 
-  if (factory)
+  if(factory)
     g_object_unref(factory);
 
   return 0;
diff --git a/tools/extra_defs_gen/get_plugin_defs.cc b/tools/extra_defs_gen/get_plugin_defs.cc
index d2ec60e..040f4f5 100644
--- a/tools/extra_defs_gen/get_plugin_defs.cc
+++ b/tools/extra_defs_gen/get_plugin_defs.cc
@@ -31,7 +31,7 @@ std::string get_plugin_defs(const std::string& pluginName)
   factory = gst_element_factory_find(pluginName.c_str());
 
   // Make sure that the feature is actually loaded:
-  if (factory)
+  if(factory)
   {
     GstPluginFeature* loaded_feature =
             gst_plugin_feature_load(GST_PLUGIN_FEATURE(factory));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]