X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fexport_preset.cc;h=92fcb9e5a7acc6e6cf6ed827dca22ecfc1d60219;hb=c35eae34c39c9962ac93110f67e9ea40f24834b6;hp=1c19cae513314ad32d396b6f86a35eb4942ea764;hpb=063ab23465759839eb723c20664cbfe388701fda;p=ardour.git diff --git a/libs/ardour/export_preset.cc b/libs/ardour/export_preset.cc index 1c19cae513..92fcb9e5a7 100644 --- a/libs/ardour/export_preset.cc +++ b/libs/ardour/export_preset.cc @@ -18,10 +18,11 @@ */ -#include +#include "ardour/export_preset.h" -#include +#include "ardour/session.h" +using namespace std; using namespace ARDOUR; ExportPreset::ExportPreset (string filename, Session & s) : @@ -36,7 +37,7 @@ ExportPreset::ExportPreset (string filename, Session & s) : if ((prop = root->property ("name"))) { set_name (prop->value()); } - + XMLNode * instant_xml = get_instant_xml (); if (instant_xml) { XMLNode * instant_copy = new XMLNode (*instant_xml); @@ -47,9 +48,7 @@ ExportPreset::ExportPreset (string filename, Session & s) : ExportPreset::~ExportPreset () { - if (local) { - delete local; - } + delete local; } void @@ -57,7 +56,7 @@ ExportPreset::set_name (string const & name) { _name = name; - XMLNode * node; + XMLNode * node; if ((node = global.root())) { node->add_property ("name", name); } @@ -85,7 +84,7 @@ ExportPreset::set_global_state (XMLNode & state) { delete global.root (); global.set_root (&state); - + set_id (_id.to_s()); set_name (_name); } @@ -95,7 +94,7 @@ ExportPreset::set_local_state (XMLNode & state) { delete local; local = &state; - + set_id (_id.to_s()); set_name (_name); } @@ -120,7 +119,7 @@ XMLNode * ExportPreset::get_instant_xml () const { XMLNode * instant_xml; - + if ((instant_xml = session.instant_xml ("ExportPresets"))) { XMLNodeList children = instant_xml->children ("ExportPreset"); for (XMLNodeList::iterator it = children.begin(); it != children.end(); ++it) { @@ -130,7 +129,7 @@ ExportPreset::get_instant_xml () const } } } - + return 0; } @@ -140,9 +139,9 @@ ExportPreset::save_instant_xml () const if (!local) { return; } /* First remove old, then add new */ - + remove_instant_xml (); - + XMLNode * instant_xml; if ((instant_xml = session.instant_xml ("ExportPresets"))) { instant_xml->add_child_copy (*local);