From a659a13c531e991851e013db3d4223bf16a343b8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 24 Jan 2014 17:28:43 +0000 Subject: Fix various whitespace and formatting issues. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5325 a436a847-0d15-0410-975c-d299462d15a1 --- ingen/Atom.hpp | 2 +- ingen/AtomReader.hpp | 1 - ingen/AtomSink.hpp | 1 - ingen/AtomWriter.hpp | 1 - ingen/ClashAvoider.hpp | 1 - ingen/Configuration.hpp | 3 +-- ingen/Interface.hpp | 1 - ingen/URIs.hpp | 2 +- ingen/client/PluginModel.hpp | 1 - ingen/client/PluginUI.hpp | 1 - ingen/client/PortModel.hpp | 2 +- ingen/client/SigClientInterface.hpp | 24 ++++++++--------- ingen/client/ThreadedSigClientInterface.hpp | 33 ++++++++++++------------ ingen/types.hpp | 7 +++-- src/ClashAvoider.cpp | 4 +-- src/Configuration.cpp | 28 ++++++++++---------- src/bindings/Client.hpp | 8 +++--- src/bindings/ingen_bindings.hpp | 4 +-- src/client/ClientStore.cpp | 3 +-- src/client/GraphModel.cpp | 8 +++--- src/client/ObjectModel.cpp | 1 - src/client/ingen_client.cpp | 1 - src/gui/App.cpp | 5 ++-- src/gui/App.hpp | 29 ++++++++++----------- src/gui/BreadCrumbs.cpp | 22 ++++++++-------- src/gui/BreadCrumbs.hpp | 2 +- src/gui/GraphCanvas.hpp | 2 +- src/gui/GraphPortModule.cpp | 2 +- src/gui/GraphPortModule.hpp | 2 +- src/gui/GraphTreeWindow.cpp | 8 +++--- src/gui/GraphTreeWindow.hpp | 4 +-- src/gui/GraphView.cpp | 2 +- src/gui/GraphView.hpp | 8 +++--- src/gui/GraphWindow.hpp | 2 +- src/gui/LoadGraphWindow.cpp | 36 +++++++++++++------------- src/gui/LoadPluginWindow.cpp | 1 - src/gui/NodeMenu.cpp | 8 +++--- src/gui/NodeModule.cpp | 4 +-- src/gui/NodeModule.hpp | 6 ++--- src/gui/ObjectMenu.cpp | 19 +++++++------- src/gui/PluginMenu.hpp | 2 +- src/gui/Port.cpp | 10 ++++---- src/gui/PortMenu.cpp | 5 ++-- src/gui/PropertiesWindow.cpp | 40 ++++++++++++++--------------- src/gui/Style.hpp | 1 - src/gui/SubgraphModule.cpp | 4 +-- src/gui/SubgraphModule.hpp | 6 ++--- src/gui/ThreadedLoader.cpp | 7 ++--- src/gui/ThreadedLoader.hpp | 6 ++--- src/gui/Window.cpp | 1 - src/gui/WindowFactory.cpp | 5 ++-- src/gui/ingen_gui.cpp | 1 - src/ingen/main.cpp | 15 +++++------ src/runtime_paths.cpp | 1 - src/serialisation/Parser.cpp | 11 ++++---- src/serialisation/serialisation.cpp | 7 ++--- src/server/ArcImpl.cpp | 1 - src/server/BlockImpl.cpp | 1 - src/server/Broadcaster.hpp | 1 - src/server/Buffer.cpp | 4 +-- src/server/Context.hpp | 1 - src/server/GraphImpl.cpp | 2 +- src/server/GraphPlugin.hpp | 1 - src/server/InputPort.cpp | 1 - src/server/InternalPlugin.hpp | 1 - src/server/JackDriver.cpp | 4 +-- src/server/LV2Block.cpp | 1 - src/server/LV2Block.hpp | 1 - src/server/LV2Plugin.hpp | 1 - src/server/PluginImpl.hpp | 1 - src/server/PreProcessor.hpp | 1 - src/server/events.hpp | 1 - src/server/events/CreateBlock.cpp | 8 +++--- src/server/events/CreatePort.cpp | 1 - src/server/events/Delta.cpp | 1 - src/server/events/Disconnect.cpp | 1 - src/server/events/DisconnectAll.cpp | 1 - src/server/events/Get.cpp | 1 - src/server/events/SetPortValue.cpp | 1 - src/server/internals/Controller.cpp | 1 - src/server/internals/Delay.cpp | 1 - src/server/internals/Note.cpp | 3 +-- src/server/internals/Time.cpp | 1 - tests/ingen_test.cpp | 16 ++---------- 84 files changed, 214 insertions(+), 266 deletions(-) diff --git a/ingen/Atom.hpp b/ingen/Atom.hpp index 7a3e5797..2e585a47 100644 --- a/ingen/Atom.hpp +++ b/ingen/Atom.hpp @@ -31,7 +31,7 @@ class Forge; /** A generic typed data container. - + An Atom holds a value with some type and size, both specified by a uint32_t. Values with size less than sizeof(void*) are stored inline: no dynamic allocation occurs so Atoms may be created in hard real-time threads. diff --git a/ingen/AtomReader.hpp b/ingen/AtomReader.hpp index 1cf55bb5..b4c4418a 100644 --- a/ingen/AtomReader.hpp +++ b/ingen/AtomReader.hpp @@ -67,4 +67,3 @@ private: } // namespace Ingen #endif // INGEN_ATOMREADER_HPP - diff --git a/ingen/AtomSink.hpp b/ingen/AtomSink.hpp index ae8fd07a..ade5e147 100644 --- a/ingen/AtomSink.hpp +++ b/ingen/AtomSink.hpp @@ -37,4 +37,3 @@ public: } // namespace Ingen #endif // INGEN_ATOMSINK_HPP - diff --git a/ingen/AtomWriter.hpp b/ingen/AtomWriter.hpp index a0a799e2..c591c528 100644 --- a/ingen/AtomWriter.hpp +++ b/ingen/AtomWriter.hpp @@ -98,4 +98,3 @@ private: } // namespace Ingen #endif // INGEN_ATOMWRITER_HPP - diff --git a/ingen/ClashAvoider.hpp b/ingen/ClashAvoider.hpp index 60affa2a..98d508d4 100644 --- a/ingen/ClashAvoider.hpp +++ b/ingen/ClashAvoider.hpp @@ -105,4 +105,3 @@ private: } // namespace Ingen #endif // INGEN_CLASHAVOIDER_HPP - diff --git a/ingen/Configuration.hpp b/ingen/Configuration.hpp index ffa9723e..acad6d22 100644 --- a/ingen/Configuration.hpp +++ b/ingen/Configuration.hpp @@ -145,7 +145,7 @@ private: int set_value_from_string(Configuration::Option& option, const std::string& value) - throw (Configuration::OptionError); + throw (Configuration::OptionError); Forge& _forge; const std::string _shortdesc; @@ -160,4 +160,3 @@ private: } // namespace Ingen #endif // INGEN_CONFIGURATION_HPP - diff --git a/ingen/Interface.hpp b/ingen/Interface.hpp index 0fc90d42..d5fe0b97 100644 --- a/ingen/Interface.hpp +++ b/ingen/Interface.hpp @@ -105,4 +105,3 @@ public: } // namespace Ingen #endif // INGEN_INTERFACE_HPP - diff --git a/ingen/URIs.hpp b/ingen/URIs.hpp index 44f57e3f..ba822947 100644 --- a/ingen/URIs.hpp +++ b/ingen/URIs.hpp @@ -24,7 +24,7 @@ #include "raul/URI.hpp" namespace Raul { - class Forge; +class Forge; } namespace Ingen { diff --git a/ingen/client/PluginModel.hpp b/ingen/client/PluginModel.hpp index 016e444e..79fae72d 100644 --- a/ingen/client/PluginModel.hpp +++ b/ingen/client/PluginModel.hpp @@ -108,4 +108,3 @@ private: } // namespace Ingen #endif // INGEN_CLIENT_PLUGINMODEL_HPP - diff --git a/ingen/client/PluginUI.hpp b/ingen/client/PluginUI.hpp index 1857d3e2..63e1074d 100644 --- a/ingen/client/PluginUI.hpp +++ b/ingen/client/PluginUI.hpp @@ -80,4 +80,3 @@ private: } // namespace Ingen #endif // INGEN_CLIENT_PLUGINUI_HPP - diff --git a/ingen/client/PortModel.hpp b/ingen/client/PortModel.hpp index 84a5d0d8..647aa922 100644 --- a/ingen/client/PortModel.hpp +++ b/ingen/client/PortModel.hpp @@ -45,7 +45,7 @@ public: bool supports(const Raul::URI& value_type) const; - inline uint32_t index() const { return _index; } + inline uint32_t index() const { return _index; } inline const Atom& value() const { return get_property(_uris.ingen_value); } inline bool connected() const { return (_connections > 0); } inline bool is_input() const { return (_direction == Direction::INPUT); } diff --git a/ingen/client/SigClientInterface.hpp b/ingen/client/SigClientInterface.hpp index 2210d4f4..07e6e333 100644 --- a/ingen/client/SigClientInterface.hpp +++ b/ingen/client/SigClientInterface.hpp @@ -70,44 +70,44 @@ protected: #define EMIT(name, ...) { _signal_ ## name (__VA_ARGS__); } void bundle_begin() - { EMIT(bundle_begin); } + { EMIT(bundle_begin); } void bundle_end() - { EMIT(bundle_end); } + { EMIT(bundle_end); } void response(int32_t id, Status status, const std::string& subject) - { EMIT(response, id, status, subject); } + { EMIT(response, id, status, subject); } void error(const std::string& msg) - { EMIT(error, msg); } + { EMIT(error, msg); } void put(const Raul::URI& uri, const Resource::Properties& properties, Resource::Graph ctx=Resource::Graph::DEFAULT) - { EMIT(put, uri, properties, ctx); } + { EMIT(put, uri, properties, ctx); } void delta(const Raul::URI& uri, const Resource::Properties& remove, const Resource::Properties& add) - { EMIT(delta, uri, remove, add); } + { EMIT(delta, uri, remove, add); } void connect(const Raul::Path& tail, const Raul::Path& head) - { EMIT(connection, tail, head); } + { EMIT(connection, tail, head); } void del(const Raul::URI& uri) - { EMIT(object_deleted, uri); } + { EMIT(object_deleted, uri); } void move(const Raul::Path& old_path, const Raul::Path& new_path) - { EMIT(object_moved, old_path, new_path); } + { EMIT(object_moved, old_path, new_path); } void disconnect(const Raul::Path& tail, const Raul::Path& head) - { EMIT(disconnection, tail, head); } + { EMIT(disconnection, tail, head); } void disconnect_all(const Raul::Path& graph, const Raul::Path& path) - { EMIT(disconnect_all, graph, path); } + { EMIT(disconnect_all, graph, path); } void set_property(const Raul::URI& subject, const Raul::URI& key, const Atom& value) - { EMIT(property_change, subject, key, value); } + { EMIT(property_change, subject, key, value); } void set_response_id(int32_t id) {} void get(const Raul::URI& uri) {} diff --git a/ingen/client/ThreadedSigClientInterface.hpp b/ingen/client/ThreadedSigClientInterface.hpp index 562c5fca..dbfe23bb 100644 --- a/ingen/client/ThreadedSigClientInterface.hpp +++ b/ingen/client/ThreadedSigClientInterface.hpp @@ -67,44 +67,44 @@ public: virtual Raul::URI uri() const { return Raul::URI("ingen:/clients/sig_queue"); } void bundle_begin() - { push_sig(bundle_begin_slot); } + { push_sig(bundle_begin_slot); } void bundle_end() - { push_sig(bundle_end_slot); } + { push_sig(bundle_end_slot); } void response(int32_t id, Status status, const std::string& subject) - { push_sig(sigc::bind(response_slot, id, status, subject)); } + { push_sig(sigc::bind(response_slot, id, status, subject)); } void error(const std::string& msg) - { push_sig(sigc::bind(error_slot, msg)); } + { push_sig(sigc::bind(error_slot, msg)); } void put(const Raul::URI& path, const Resource::Properties& properties, Resource::Graph ctx=Resource::Graph::DEFAULT) - { push_sig(sigc::bind(put_slot, path, properties, ctx)); } + { push_sig(sigc::bind(put_slot, path, properties, ctx)); } void delta(const Raul::URI& path, const Resource::Properties& remove, const Resource::Properties& add) - { push_sig(sigc::bind(delta_slot, path, remove, add)); } + { push_sig(sigc::bind(delta_slot, path, remove, add)); } void connect(const Raul::Path& tail, const Raul::Path& head) - { push_sig(sigc::bind(connection_slot, tail, head)); } + { push_sig(sigc::bind(connection_slot, tail, head)); } void del(const Raul::URI& uri) - { push_sig(sigc::bind(object_deleted_slot, uri)); } + { push_sig(sigc::bind(object_deleted_slot, uri)); } void move(const Raul::Path& old_path, const Raul::Path& new_path) - { push_sig(sigc::bind(object_moved_slot, old_path, new_path)); } + { push_sig(sigc::bind(object_moved_slot, old_path, new_path)); } void disconnect(const Raul::Path& tail, const Raul::Path& head) - { push_sig(sigc::bind(disconnection_slot, tail, head)); } + { push_sig(sigc::bind(disconnection_slot, tail, head)); } void disconnect_all(const Raul::Path& graph, const Raul::Path& path) - { push_sig(sigc::bind(disconnect_all_slot, graph, path)); } + { push_sig(sigc::bind(disconnect_all_slot, graph, path)); } void set_property(const Raul::URI& subject, const Raul::URI& key, const Atom& value) - { push_sig(sigc::bind(property_change_slot, subject, key, value)); } + { push_sig(sigc::bind(property_change_slot, subject, key, value)); } /** Process all queued events - Called from GTK thread to emit signals. */ bool emit_signals() { @@ -144,15 +144,16 @@ private: Raul::SRSWQueue _sigs; + using Properties = Resource::Properties; + using Graph = Resource::Graph; + sigc::slot bundle_begin_slot; sigc::slot bundle_end_slot; sigc::slot response_slot; sigc::slot error_slot; sigc::slot new_plugin_slot; - sigc::slot put_slot; - sigc::slot delta_slot; + sigc::slot put_slot; + sigc::slot delta_slot; sigc::slot connection_slot; sigc::slot object_deleted_slot; sigc::slot object_moved_slot; diff --git a/ingen/types.hpp b/ingen/types.hpp index 0f0fe718..71f044d9 100644 --- a/ingen/types.hpp +++ b/ingen/types.hpp @@ -35,17 +35,17 @@ using WPtr = std::weak_ptr; template void NullDeleter(T* ptr) {} -template +template SPtr static_ptr_cast(const SPtr& r) { return std::static_pointer_cast(r); } -template +template SPtr dynamic_ptr_cast(const SPtr& r) { return std::dynamic_pointer_cast(r); } -template +template SPtr const_ptr_cast(const SPtr& r) { return std::const_pointer_cast(r); } @@ -53,4 +53,3 @@ SPtr const_ptr_cast(const SPtr& r) { } // namespace Ingen #endif // INGEN_TYPES_HPP - diff --git a/src/ClashAvoider.cpp b/src/ClashAvoider.cpp index 5ac7a773..734b7d04 100644 --- a/src/ClashAvoider.cpp +++ b/src/ClashAvoider.cpp @@ -74,14 +74,14 @@ ClashAvoider::map_path(const Raul::Path& in) parent = parent.parent(); } while (!parent.is_root()); - // No clash, use symbol unmodified if (!exists(in) && _symbol_map.find(in) == _symbol_map.end()) { + // No clash, use symbol unmodified InsertRecord i = _symbol_map.insert(make_pair(in, in)); assert(i.second); return i.first->second; - // Append _2 _3 etc until an unused symbol is found } else { + // Append _2 _3 etc until an unused symbol is found while (true) { Offsets::iterator o = _offsets.find(base_path); if (o != _offsets.end()) { diff --git a/src/Configuration.cpp b/src/Configuration.cpp index 67899d9a..536be9d8 100644 --- a/src/Configuration.cpp +++ b/src/Configuration.cpp @@ -35,17 +35,17 @@ Configuration::Configuration(Forge& forge) : _forge(forge) , _shortdesc("A realtime modular audio processor.") , _desc( -"Ingen is a flexible modular system that be used in various ways.\n" -"The engine can run as a stand-alone server controlled via network protocol,\n" -"or internal to another process (e.g. the GUI). The GUI, or other clients,\n" -"can communicate with the engine via any supported protocol, or run in the\n" -"same process. Many clients can connect to an engine at once.\n\n" -"Examples:\n" -" ingen -e # Run an engine, listen for connections\n" -" ingen -g # Run a GUI, connect to running engine\n" -" ingen -eg # Run an engine and a GUI in one process\n" -" ingen -egl foo.ttl # Run an engine and a GUI and load a graph\n" -" ingen -egl foo.ingen # Run an engine and a GUI and load a graph") + "Ingen is a flexible modular system that be used in various ways.\n" + "The engine can run as a stand-alone server controlled via network protocol,\n" + "or internal to another process (e.g. the GUI). The GUI, or other clients,\n" + "can communicate with the engine via any supported protocol, or run in the\n" + "same process. Many clients can connect to an engine at once.\n\n" + "Examples:\n" + " ingen -e # Run an engine, listen for connections\n" + " ingen -g # Run a GUI, connect to running engine\n" + " ingen -eg # Run an engine and a GUI in one process\n" + " ingen -egl foo.ttl # Run an engine and a GUI and load a graph\n" + " ingen -egl foo.ingen # Run an engine and a GUI and load a graph") , _max_name_length(0) { add("clientPort", "client-port", 'C', "Client port", SESSION, forge.Int, Atom()); @@ -97,7 +97,7 @@ Configuration::print_usage(const std::string& program, std::ostream& os) os << "Options:" << std::endl; for (auto o : _options) { Option& option = o.second; - os << " "; + os << " "; if (option.letter != '\0') os << "-" << option.letter << ", "; else @@ -240,7 +240,7 @@ Configuration::save(URIMap& uri_map, const std::string dir = Glib::path_get_dirname(path); if (g_mkdir_with_parents(dir.c_str(), 0755) < 0) { throw FileError((fmt("Error creating directory %1% (%2%)") - % dir % strerror(errno)).str()); + % dir % strerror(errno)).str()); } // Attempt to open file for writing @@ -283,7 +283,7 @@ Configuration::save(URIMap& uri_map, for (auto o : _options) { const Atom& value = o.second.value; if (!(o.second.scope & scopes) || - o.second.key.empty() || + o.second.key.empty() || !value.is_valid()) { continue; } diff --git a/src/bindings/Client.hpp b/src/bindings/Client.hpp index e2db6644..f277e7f9 100644 --- a/src/bindings/Client.hpp +++ b/src/bindings/Client.hpp @@ -24,10 +24,10 @@ class Client : public Ingen::ClientInterface { public: - /** Wrapper for engine->register_client to appease SWIG */ - virtual void subscribe(Ingen::ServerInterface* engine) { - engine->register_client(this); - } + /** Wrapper for engine->register_client to appease SWIG */ + virtual void subscribe(Ingen::ServerInterface* engine) { + engine->register_client(this); + } void bundle_begin() {} void bundle_end() {} diff --git a/src/bindings/ingen_bindings.hpp b/src/bindings/ingen_bindings.hpp index 90358cd8..b07baae8 100644 --- a/src/bindings/ingen_bindings.hpp +++ b/src/bindings/ingen_bindings.hpp @@ -23,8 +23,8 @@ class World; extern World* ingen_world; extern "C" { - bool run(World* world, const char* filename); - void script_iteration(World* world); +bool run(World* world, const char* filename); +void script_iteration(World* world); } } // namespace Ingen diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp index f5c99e38..d3438f46 100644 --- a/src/client/ClientStore.cpp +++ b/src/client/ClientStore.cpp @@ -296,7 +296,7 @@ ClientStore::put(const Raul::URI& uri, } else { _log.error(fmt("Port %1% has no index\n") % path); } - + SPtr p(new PortModel(uris(), path, index, pdir)); p->set_properties(properties); add_object(p); @@ -479,4 +479,3 @@ ClientStore::disconnect_all(const Raul::Path& parent_graph, } // namespace Client } // namespace Ingen - diff --git a/src/client/GraphModel.cpp b/src/client/GraphModel.cpp index 493293a5..764c3b75 100644 --- a/src/client/GraphModel.cpp +++ b/src/client/GraphModel.cpp @@ -58,9 +58,9 @@ GraphModel::remove_child(SPtr o) SPtr arc = dynamic_ptr_cast(j->second); if (arc->tail_path().parent() == o->path() - || arc->tail_path() == o->path() - || arc->head_path().parent() == o->path() - || arc->head_path() == o->path()) { + || arc->tail_path() == o->path() + || arc->head_path().parent() == o->path() + || arc->head_path() == o->path()) { _signal_removed_arc.emit(arc); _arcs.erase(j); // cuts our reference } @@ -123,7 +123,7 @@ GraphModel::add_arc(SPtr arc) || arc->head()->parent()->parent().get() == this); SPtr existing = get_arc( - arc->tail().get(), arc->head().get()); + arc->tail().get(), arc->head().get()); if (existing) { assert(arc->tail() == existing->tail()); diff --git a/src/client/ObjectModel.cpp b/src/client/ObjectModel.cpp index 45ac2f37..76ae5080 100644 --- a/src/client/ObjectModel.cpp +++ b/src/client/ObjectModel.cpp @@ -108,4 +108,3 @@ ObjectModel::set_parent(SPtr p) } // namespace Client } // namespace Ingen - diff --git a/src/client/ingen_client.cpp b/src/client/ingen_client.cpp index 6f873f14..55623b66 100644 --- a/src/client/ingen_client.cpp +++ b/src/client/ingen_client.cpp @@ -34,4 +34,3 @@ ingen_module_load() } } // extern "C" - diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 719fe694..3dc08609 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -369,8 +369,8 @@ App::can_control(const Client::PortModel* port) const return port->is_a(uris().lv2_ControlPort) || port->is_a(uris().lv2_CVPort) || (port->is_a(uris().atom_AtomPort) - && (port->supports(uris().atom_Float) - || port->supports(uris().atom_String))); + && (port->supports(uris().atom_Float) + || port->supports(uris().atom_String))); } uint32_t @@ -381,4 +381,3 @@ App::sample_rate() const } // namespace GUI } // namespace Ingen - diff --git a/src/gui/App.hpp b/src/gui/App.hpp index dbb0465c..4adee828 100644 --- a/src/gui/App.hpp +++ b/src/gui/App.hpp @@ -34,20 +34,20 @@ #include "raul/URI.hpp" namespace Ingen { - class Interface; - class Log; - class Port; - class World; - namespace Client { - class ClientStore; - class GraphModel; - class PluginModel; - class PortModel; - class SigClientInterface; - } - namespace Serialisation { - class Serialiser; - } +class Interface; +class Log; +class Port; +class World; +namespace Client { +class ClientStore; +class GraphModel; +class PluginModel; +class PortModel; +class SigClientInterface; +} +namespace Serialisation { +class Serialiser; +} } namespace Ingen { @@ -160,4 +160,3 @@ protected: } // namespace Ingen #endif // INGEN_GUI_APP_HPP - diff --git a/src/gui/BreadCrumbs.cpp b/src/gui/BreadCrumbs.cpp index 8073f933..6ed0bfca 100644 --- a/src/gui/BreadCrumbs.cpp +++ b/src/gui/BreadCrumbs.cpp @@ -34,7 +34,7 @@ BreadCrumbs::BreadCrumbs(App& app) , _enable_signal(true) { app.client()->signal_object_deleted().connect( - sigc::mem_fun(this, &BreadCrumbs::object_destroyed)); + sigc::mem_fun(this, &BreadCrumbs::object_destroyed)); set_can_focus(false); } @@ -60,8 +60,8 @@ BreadCrumbs::build(Raul::Path path, SPtr view) bool old_enable_signal = _enable_signal; _enable_signal = false; - // Moving to a path we already contain, just switch the active button if (!_breadcrumbs.empty() && (path.is_parent_of(_full_path) || path == _full_path)) { + // Moving to a path we already contain, just switch the active button for (const auto& b : _breadcrumbs) { if (b->path() == path) { b->set_active(true); @@ -79,8 +79,8 @@ BreadCrumbs::build(Raul::Path path, SPtr view) _active_path = path; _enable_signal = old_enable_signal; - // Moving to a child of the full path, just append crumbs (preserve view cache) } else if (!_breadcrumbs.empty() && path.is_child_of(_full_path)) { + // Moving to a child of the full path, just append crumbs (preserve view cache) string suffix = path.substr(_full_path.length()); while (suffix.length() > 0) { @@ -102,9 +102,9 @@ BreadCrumbs::build(Raul::Path path, SPtr view) b->set_active(false); _breadcrumbs.back()->set_active(true); - // Rebuild from scratch - // Getting here is bad unless absolutely necessary, since the GraphView cache is lost } else { + // Rebuild from scratch + // Getting here is bad unless absolutely necessary, since the GraphView cache is lost _full_path = path; _active_path = path; @@ -149,11 +149,14 @@ BreadCrumbs::BreadCrumb* BreadCrumbs::create_crumb(const Raul::Path& path, SPtr view) { - BreadCrumb* but = manage(new BreadCrumb(path, - (view && path == view->graph()->path()) ? view : SPtr())); + BreadCrumb* but = manage( + new BreadCrumb(path, + ((view && path == view->graph()->path()) + ? view : SPtr()))); - but->signal_toggled().connect(sigc::bind(sigc::mem_fun( - this, &BreadCrumbs::breadcrumb_clicked), but)); + but->signal_toggled().connect( + sigc::bind(sigc::mem_fun(this, &BreadCrumbs::breadcrumb_clicked), + but)); return but; } @@ -203,4 +206,3 @@ BreadCrumbs::object_moved(const Raul::Path& old_path, const Raul::Path& new_path } // namespace GUI } // namespace Ingen - diff --git a/src/gui/BreadCrumbs.hpp b/src/gui/BreadCrumbs.hpp index 933a28dc..235709b4 100644 --- a/src/gui/BreadCrumbs.hpp +++ b/src/gui/BreadCrumbs.hpp @@ -99,7 +99,7 @@ private: }; BreadCrumb* create_crumb(const Raul::Path& path, - SPtr view = SPtr()); + SPtr view = SPtr()); void breadcrumb_clicked(BreadCrumb* crumb); diff --git a/src/gui/GraphCanvas.hpp b/src/gui/GraphCanvas.hpp index 47d267d2..f076e919 100644 --- a/src/gui/GraphCanvas.hpp +++ b/src/gui/GraphCanvas.hpp @@ -100,7 +100,7 @@ private: void build_menus(); - void auto_menu_position(int& x, int& y, bool& push_in); + void auto_menu_position(int& x, int& y, bool& push_in); typedef std::multimap LV2Children; diff --git a/src/gui/GraphPortModule.cpp b/src/gui/GraphPortModule.cpp index 3c9004e3..dc781a35 100644 --- a/src/gui/GraphPortModule.cpp +++ b/src/gui/GraphPortModule.cpp @@ -55,7 +55,7 @@ GraphPortModule::GraphPortModule(GraphCanvas& canvas, set_stacked(model->polyphonic()); if (model->is_input() && !model->is_numeric()) { set_is_source(true); - } + } model->signal_property().connect( sigc::mem_fun(this, &GraphPortModule::property_changed)); diff --git a/src/gui/GraphPortModule.hpp b/src/gui/GraphPortModule.hpp index f9292363..5cffa7bc 100644 --- a/src/gui/GraphPortModule.hpp +++ b/src/gui/GraphPortModule.hpp @@ -27,7 +27,7 @@ namespace Raul { class Atom; } namespace Ingen { namespace Client { - class PortModel; +class PortModel; } } namespace Ingen { diff --git a/src/gui/GraphTreeWindow.cpp b/src/gui/GraphTreeWindow.cpp index 7ebb405d..ae4e522d 100644 --- a/src/gui/GraphTreeWindow.cpp +++ b/src/gui/GraphTreeWindow.cpp @@ -43,10 +43,10 @@ GraphTreeWindow::GraphTreeWindow(BaseObjectType* cobject, _graph_treestore = Gtk::TreeStore::create(_graph_tree_columns); _graphs_treeview->set_window(this); _graphs_treeview->set_model(_graph_treestore); - Gtk::TreeViewColumn* name_col = Gtk::manage(new Gtk::TreeViewColumn( - "Graph", _graph_tree_columns.name_col)); - Gtk::TreeViewColumn* enabled_col = Gtk::manage(new Gtk::TreeViewColumn( - "Run", _graph_tree_columns.enabled_col)); + Gtk::TreeViewColumn* name_col = Gtk::manage( + new Gtk::TreeViewColumn("Graph", _graph_tree_columns.name_col)); + Gtk::TreeViewColumn* enabled_col = Gtk::manage( + new Gtk::TreeViewColumn("Run", _graph_tree_columns.enabled_col)); name_col->set_resizable(true); name_col->set_expand(true); diff --git a/src/gui/GraphTreeWindow.hpp b/src/gui/GraphTreeWindow.hpp index 3a4f465d..67f6304c 100644 --- a/src/gui/GraphTreeWindow.hpp +++ b/src/gui/GraphTreeWindow.hpp @@ -66,8 +66,8 @@ protected: void event_graph_enabled_toggled(const Glib::ustring& path_str); Gtk::TreeModel::iterator find_graph( - Gtk::TreeModel::Children root, - SPtr graph); + Gtk::TreeModel::Children root, + SPtr graph); GraphTreeView* _graphs_treeview; diff --git a/src/gui/GraphView.cpp b/src/gui/GraphView.cpp index 7b2e9842..414f21f9 100644 --- a/src/gui/GraphView.cpp +++ b/src/gui/GraphView.cpp @@ -95,7 +95,7 @@ GraphView::set_graph(SPtr graph) sigc::mem_fun(this, &GraphView::refresh_clicked)); _poly_spin->signal_value_changed().connect( - sigc::mem_fun(*this, &GraphView::poly_changed)); + sigc::mem_fun(*this, &GraphView::poly_changed)); _canvas->widget().grab_focus(); } diff --git a/src/gui/GraphView.hpp b/src/gui/GraphView.hpp index b052028c..f0524673 100644 --- a/src/gui/GraphView.hpp +++ b/src/gui/GraphView.hpp @@ -34,10 +34,10 @@ namespace Raul { class Atom; } namespace Ingen { namespace Client { - class PortModel; - class MetadataModel; - class GraphModel; - class ObjectModel; +class PortModel; +class MetadataModel; +class GraphModel; +class ObjectModel; } namespace GUI { diff --git a/src/gui/GraphWindow.hpp b/src/gui/GraphWindow.hpp index 46126589..593ef048 100644 --- a/src/gui/GraphWindow.hpp +++ b/src/gui/GraphWindow.hpp @@ -29,7 +29,7 @@ namespace Ingen { namespace Client { - class GraphModel; +class GraphModel; } namespace GUI { diff --git a/src/gui/LoadGraphWindow.cpp b/src/gui/LoadGraphWindow.cpp index babfb632..064b728e 100644 --- a/src/gui/LoadGraphWindow.cpp +++ b/src/gui/LoadGraphWindow.cpp @@ -60,22 +60,22 @@ LoadGraphWindow::LoadGraphWindow(BaseObjectType* cobject, xml->get_widget("load_graph_cancel_button", _cancel_button); _cancel_button->signal_clicked().connect( - sigc::mem_fun(this, &LoadGraphWindow::cancel_clicked)); + sigc::mem_fun(this, &LoadGraphWindow::cancel_clicked)); _ok_button->signal_clicked().connect( - sigc::mem_fun(this, &LoadGraphWindow::ok_clicked)); + sigc::mem_fun(this, &LoadGraphWindow::ok_clicked)); _merge_ports_radio->signal_toggled().connect( - sigc::mem_fun(this, &LoadGraphWindow::merge_ports_selected)); + sigc::mem_fun(this, &LoadGraphWindow::merge_ports_selected)); _insert_ports_radio->signal_toggled().connect( - sigc::mem_fun(this, &LoadGraphWindow::insert_ports_selected)); - _poly_from_file_radio->signal_toggled().connect(sigc::bind( - sigc::mem_fun(_poly_spinbutton, &Gtk::SpinButton::set_sensitive), - false)); - _poly_voices_radio->signal_toggled().connect(sigc::bind( - sigc::mem_fun(_poly_spinbutton, &Gtk::SpinButton::set_sensitive), - true)); + sigc::mem_fun(this, &LoadGraphWindow::insert_ports_selected)); + _poly_from_file_radio->signal_toggled().connect( + sigc::bind(sigc::mem_fun(_poly_spinbutton, &Gtk::SpinButton::set_sensitive), + false)); + _poly_voices_radio->signal_toggled().connect( + sigc::bind(sigc::mem_fun(_poly_spinbutton, &Gtk::SpinButton::set_sensitive), + true)); signal_selection_changed().connect( - sigc::mem_fun(this, &LoadGraphWindow::selection_changed)); + sigc::mem_fun(this, &LoadGraphWindow::selection_changed)); Gtk::FileFilter filt; filt.add_pattern("*.ttl"); @@ -172,8 +172,8 @@ LoadGraphWindow::ok_clicked() symbol = _graph->symbol(); } - _app->loader()->load_graph(true, get_filename(), - parent, symbol, _initial_data); + _app->loader()->load_graph( + true, get_filename(), parent, symbol, _initial_data); } else { std::list uri_list = get_filenames(); @@ -190,8 +190,8 @@ LoadGraphWindow::ok_clicked() symbol = avoid_symbol_clash(symbol); - _app->loader()->load_graph(false, u, - _graph->path(), symbol, _initial_data); + _app->loader()->load_graph( + false, u, _graph->path(), symbol, _initial_data); } } @@ -222,7 +222,7 @@ Raul::Symbol LoadGraphWindow::avoid_symbol_clash(const Raul::Symbol& symbol) { unsigned offset = _app->store()->child_name_offset( - _graph->path(), symbol); + _graph->path(), symbol); if (offset != 0) { std::stringstream ss; @@ -243,8 +243,8 @@ LoadGraphWindow::selection_changed() _symbol_entry->set_text(""); _symbol_entry->set_sensitive(false); } else { - _symbol_entry->set_text(avoid_symbol_clash( - symbol_from_filename(get_filename())).c_str()); + _symbol_entry->set_text( + avoid_symbol_clash(symbol_from_filename(get_filename())).c_str()); _symbol_entry->set_sensitive(true); } } diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp index 018856fe..fd8a8868 100644 --- a/src/gui/LoadPluginWindow.cpp +++ b/src/gui/LoadPluginWindow.cpp @@ -510,4 +510,3 @@ LoadPluginWindow::plugin_property_changed(const Raul::URI& plugin, } // namespace GUI } // namespace Ingen - diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp index de744226..ed764904 100644 --- a/src/gui/NodeMenu.cpp +++ b/src/gui/NodeMenu.cpp @@ -54,8 +54,8 @@ NodeMenu::init(App& app, SPtr block) { ObjectMenu::init(app, block); - _learn_menuitem->signal_activate().connect(sigc::mem_fun(this, - &NodeMenu::on_menu_learn)); + _learn_menuitem->signal_activate().connect( + sigc::mem_fun(this, &NodeMenu::on_menu_learn)); _popup_gui_menuitem->signal_activate().connect( sigc::mem_fun(signal_popup_gui, &sigc::signal::emit)); _embed_gui_menuitem->signal_toggled().connect( @@ -132,7 +132,7 @@ NodeMenu::init(App& app, SPtr block) _randomize_menuitem->hide(); if (plugin && (plugin->uri() == "http://drobilla.net/ns/ingen-internals#Controller" - || plugin->uri() == "http://drobilla.net/ns/ingen-internals#Trigger")) + || plugin->uri() == "http://drobilla.net/ns/ingen-internals#Trigger")) _learn_menuitem->show(); else _learn_menuitem->hide(); @@ -188,7 +188,7 @@ set_port_value(const char* port_symbol, fmt("Preset with invalid port symbol `%1'\n") % port_symbol); return; } - + menu->app()->interface()->set_property( Node::path_to_uri(block->path().child(Raul::Symbol(port_symbol))), menu->app()->uris().ingen_value, diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp index cd801a05..aa2b543c 100644 --- a/src/gui/NodeModule.cpp +++ b/src/gui/NodeModule.cpp @@ -153,7 +153,7 @@ NodeModule::show_human_names(bool b) label = name_property.ptr(); } else { Glib::ustring hn = block()->plugin_model()->port_human_name( - port->model()->index()); + port->model()->index()); if (!hn.empty()) label = hn; } @@ -326,7 +326,7 @@ NodeModule::popup_gui() set_control_values(); _gui_window->signal_unmap().connect( - sigc::mem_fun(this, &NodeModule::on_gui_window_close)); + sigc::mem_fun(this, &NodeModule::on_gui_window_close)); _gui_window->present(); return true; diff --git a/src/gui/NodeModule.hpp b/src/gui/NodeModule.hpp index e38859ef..e163735e 100644 --- a/src/gui/NodeModule.hpp +++ b/src/gui/NodeModule.hpp @@ -25,9 +25,9 @@ namespace Raul { class Atom; } namespace Ingen { namespace Client { - class BlockModel; - class PluginUI; - class PortModel; +class BlockModel; +class PluginUI; +class PortModel; } } namespace Ingen { diff --git a/src/gui/ObjectMenu.cpp b/src/gui/ObjectMenu.cpp index f19913ac..8432e7b7 100644 --- a/src/gui/ObjectMenu.cpp +++ b/src/gui/ObjectMenu.cpp @@ -57,28 +57,28 @@ ObjectMenu::init(App& app, SPtr object) _object = object; _polyphonic_menuitem->signal_toggled().connect( - sigc::mem_fun(this, &ObjectMenu::on_menu_polyphonic)); + sigc::mem_fun(this, &ObjectMenu::on_menu_polyphonic)); _polyphonic_menuitem->set_active(object->polyphonic()); _learn_menuitem->signal_activate().connect( - sigc::mem_fun(this, &ObjectMenu::on_menu_learn)); + sigc::mem_fun(this, &ObjectMenu::on_menu_learn)); _unlearn_menuitem->signal_activate().connect( - sigc::mem_fun(this, &ObjectMenu::on_menu_unlearn)); + sigc::mem_fun(this, &ObjectMenu::on_menu_unlearn)); _disconnect_menuitem->signal_activate().connect( - sigc::mem_fun(this, &ObjectMenu::on_menu_disconnect)); + sigc::mem_fun(this, &ObjectMenu::on_menu_disconnect)); - _rename_menuitem->signal_activate().connect(sigc::bind( - sigc::mem_fun(_app->window_factory(), &WindowFactory::present_rename), - object)); + _rename_menuitem->signal_activate().connect( + sigc::bind(sigc::mem_fun(_app->window_factory(), &WindowFactory::present_rename), + object)); _destroy_menuitem->signal_activate().connect( - sigc::mem_fun(this, &ObjectMenu::on_menu_destroy)); + sigc::mem_fun(this, &ObjectMenu::on_menu_destroy)); _properties_menuitem->signal_activate().connect( - sigc::mem_fun(this, &ObjectMenu::on_menu_properties)); + sigc::mem_fun(this, &ObjectMenu::on_menu_properties)); object->signal_property().connect(sigc::mem_fun(this, &ObjectMenu::property_changed)); @@ -140,4 +140,3 @@ ObjectMenu::on_menu_properties() } // namespace GUI } // namespace Ingen - diff --git a/src/gui/PluginMenu.hpp b/src/gui/PluginMenu.hpp index 54624104..da75ef0b 100644 --- a/src/gui/PluginMenu.hpp +++ b/src/gui/PluginMenu.hpp @@ -35,7 +35,7 @@ namespace GUI { /** Type-hierarchical plugin menu. - + @ingroup GUI */ class PluginMenu : public Gtk::Menu diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index 3357a553..31850120 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -73,8 +73,8 @@ Port::Port(App& app, const string& name, bool flip) : Ganv::Port(module, name, - flip ? (!pm->is_input()) : pm->is_input(), - app.style()->get_port_color(pm.get())) + flip ? (!pm->is_input()) : pm->is_input(), + app.style()->get_port_color(pm.get())) , _app(app) , _port_model(pm) , _entered(false) @@ -109,7 +109,7 @@ Port::Port(App& app, sigc::mem_fun(this, &Port::on_event)); set_is_controllable(pm->is_numeric() && pm->is_input()); - + update_metadata(); value_changed(pm->value()); } @@ -341,8 +341,8 @@ rgba_interpolate(uint32_t c1, uint32_t c2, float f) { return rgba_to_uint( mono_interpolate(RGBA_R(c1), RGBA_R(c2), f), - mono_interpolate(RGBA_G(c1), RGBA_G(c2), f), - mono_interpolate(RGBA_B(c1), RGBA_B(c2), f), + mono_interpolate(RGBA_G(c1), RGBA_G(c2), f), + mono_interpolate(RGBA_B(c1), RGBA_B(c2), f), mono_interpolate(RGBA_A(c1), RGBA_A(c2), f)); } diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp index 138ee397..d1d1a923 100644 --- a/src/gui/PortMenu.cpp +++ b/src/gui/PortMenu.cpp @@ -91,10 +91,10 @@ PortMenu::on_menu_disconnect() { if (_is_graph_port) { _app->interface()->disconnect_all( - _object->parent()->path(), _object->path()); + _object->parent()->path(), _object->path()); } else { _app->interface()->disconnect_all( - _object->parent()->path().parent(), _object->path()); + _object->parent()->path().parent(), _object->path()); } } @@ -165,4 +165,3 @@ PortMenu::on_menu_expose() } // namespace GUI } // namespace Ingen - diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp index 2db38c8e..f6524e77 100644 --- a/src/gui/PropertiesWindow.cpp +++ b/src/gui/PropertiesWindow.cpp @@ -211,9 +211,9 @@ PropertiesWindow::set_object(SPtr model) _table->show_all(); _property_connection = model->signal_property().connect( - sigc::mem_fun(this, &PropertiesWindow::property_changed)); + sigc::mem_fun(this, &PropertiesWindow::property_changed)); _property_removed_connection = model->signal_property_removed().connect( - sigc::mem_fun(this, &PropertiesWindow::property_removed)); + sigc::mem_fun(this, &PropertiesWindow::property_removed)); } Gtk::Widget* @@ -226,9 +226,9 @@ PropertiesWindow::create_value_widget(const Raul::URI& uri, const Atom& value) widget->set_range(INT_MIN, INT_MAX); widget->set_increments(1, 10); widget->set_value(value.get()); - widget->signal_value_changed().connect(sigc::bind( - sigc::mem_fun(this, &PropertiesWindow::value_edited), - uri)); + widget->signal_value_changed().connect( + sigc::bind(sigc::mem_fun(this, &PropertiesWindow::value_edited), + uri)); return widget; } else if (value.type() == forge.Float) { Gtk::SpinButton* widget = manage(new Gtk::SpinButton(0.0, 4)); @@ -237,23 +237,23 @@ PropertiesWindow::create_value_widget(const Raul::URI& uri, const Atom& value) widget->set_range(-FLT_MAX, FLT_MAX); widget->set_value(value.get()); widget->set_increments(0.1, 1.0); - widget->signal_value_changed().connect(sigc::bind( - sigc::mem_fun(this, &PropertiesWindow::value_edited), - uri)); + widget->signal_value_changed().connect( + sigc::bind(sigc::mem_fun(this, &PropertiesWindow::value_edited), + uri)); return widget; } else if (value.type() == forge.Bool) { Gtk::CheckButton* widget = manage(new Gtk::CheckButton()); widget->set_active(value.get()); - widget->signal_toggled().connect(sigc::bind( - sigc::mem_fun(this, &PropertiesWindow::value_edited), - uri)); + widget->signal_toggled().connect( + sigc::bind(sigc::mem_fun(this, &PropertiesWindow::value_edited), + uri)); return widget; } else if (value.type() == forge.URI) { Gtk::Entry* widget = manage(new Gtk::Entry()); widget->set_text(value.ptr()); - widget->signal_changed().connect(sigc::bind( - sigc::mem_fun(this, &PropertiesWindow::value_edited), - uri)); + widget->signal_changed().connect( + sigc::bind(sigc::mem_fun(this, &PropertiesWindow::value_edited), + uri)); return widget; } else if (value.type() == forge.URID) { const char* val_uri = _app->world()->uri_map().unmap_uri(value.get()); @@ -261,16 +261,16 @@ PropertiesWindow::create_value_widget(const Raul::URI& uri, const Atom& value) if (val_uri) { widget->set_text(val_uri); } - widget->signal_changed().connect(sigc::bind( - sigc::mem_fun(this, &PropertiesWindow::value_edited), - uri)); + widget->signal_changed().connect( + sigc::bind(sigc::mem_fun(this, &PropertiesWindow::value_edited), + uri)); return widget; } else if (value.type() == forge.String) { Gtk::Entry* widget = manage(new Gtk::Entry()); widget->set_text(value.ptr()); - widget->signal_changed().connect(sigc::bind( - sigc::mem_fun(this, &PropertiesWindow::value_edited), - uri)); + widget->signal_changed().connect( + sigc::bind(sigc::mem_fun(this, &PropertiesWindow::value_edited), + uri)); return widget; } diff --git a/src/gui/Style.hpp b/src/gui/Style.hpp index e871e3fa..13fa0546 100644 --- a/src/gui/Style.hpp +++ b/src/gui/Style.hpp @@ -56,4 +56,3 @@ private: } // namespace Ingen #endif // INGEN_GUI_STYLE_HPP - diff --git a/src/gui/SubgraphModule.cpp b/src/gui/SubgraphModule.cpp index 295d3d16..c299eccc 100644 --- a/src/gui/SubgraphModule.cpp +++ b/src/gui/SubgraphModule.cpp @@ -52,8 +52,8 @@ SubgraphModule::on_double_click(GdkEventButton* event) SPtr parent = dynamic_ptr_cast(_graph->parent()); GraphWindow* const preferred = ( (parent && (event->state & GDK_SHIFT_MASK)) - ? NULL - : app().window_factory()->graph_window(parent) ); + ? NULL + : app().window_factory()->graph_window(parent) ); app().window_factory()->present_graph(_graph, preferred); return true; diff --git a/src/gui/SubgraphModule.hpp b/src/gui/SubgraphModule.hpp index a439c324..7235d93a 100644 --- a/src/gui/SubgraphModule.hpp +++ b/src/gui/SubgraphModule.hpp @@ -23,9 +23,9 @@ #include "GraphPortModule.hpp" namespace Ingen { namespace Client { - class GraphModel; - class GraphWindow; - class PortModel; +class GraphModel; +class GraphWindow; +class PortModel; } } namespace Ingen { diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp index 5c33c1de..3dffa7f9 100644 --- a/src/gui/ThreadedLoader.cpp +++ b/src/gui/ThreadedLoader.cpp @@ -113,9 +113,10 @@ ThreadedLoader::save_graph(SPtr model, { _mutex.lock(); - _events.push_back(sigc::hide_return(sigc::bind( - sigc::mem_fun(this, &ThreadedLoader::save_graph_event), - model, filename))); + _events.push_back( + sigc::hide_return( + sigc::bind(sigc::mem_fun(this, &ThreadedLoader::save_graph_event), + model, filename))); _mutex.unlock(); _sem.post(); diff --git a/src/gui/ThreadedLoader.hpp b/src/gui/ThreadedLoader.hpp index 7f4de063..68f6a3f1 100644 --- a/src/gui/ThreadedLoader.hpp +++ b/src/gui/ThreadedLoader.hpp @@ -54,10 +54,10 @@ public: ~ThreadedLoader(); void load_graph(bool merge, - const Glib::ustring& document_uri, + const Glib::ustring& document_uri, boost::optional engine_parent, - boost::optional engine_symbol, - boost::optional engine_data); + boost::optional engine_symbol, + boost::optional engine_data); void save_graph(SPtr model, const std::string& filename); diff --git a/src/gui/Window.cpp b/src/gui/Window.cpp index 52df075e..2c4ee0e4 100644 --- a/src/gui/Window.cpp +++ b/src/gui/Window.cpp @@ -33,4 +33,3 @@ Window::key_press_handler(Gtk::Window* win, GdkEventKey* event) } // namespace GUI } // namespace Ingen - diff --git a/src/gui/WindowFactory.cpp b/src/gui/WindowFactory.cpp index f8738f40..66038776 100644 --- a/src/gui/WindowFactory.cpp +++ b/src/gui/WindowFactory.cpp @@ -162,8 +162,9 @@ WindowFactory::new_graph_window(SPtr graph, win->box()->set_graph(graph, view); _graph_windows[graph->path()] = win; - win->signal_delete_event().connect(sigc::bind<0>( - sigc::mem_fun(this, &WindowFactory::remove_graph_window), win)); + win->signal_delete_event().connect( + sigc::bind<0>(sigc::mem_fun(this, &WindowFactory::remove_graph_window), + win)); return win; } diff --git a/src/gui/ingen_gui.cpp b/src/gui/ingen_gui.cpp index d8dc59ab..662d4682 100644 --- a/src/gui/ingen_gui.cpp +++ b/src/gui/ingen_gui.cpp @@ -43,4 +43,3 @@ ingen_module_load() } } // extern "C" - diff --git a/src/ingen/main.cpp b/src/ingen/main.cpp index 3c3ebdcf..6e058414 100644 --- a/src/ingen/main.cpp +++ b/src/ingen/main.cpp @@ -106,20 +106,20 @@ main(int argc, char** argv) engine_interface = world->interface(); - #ifdef HAVE_SOCKET +#ifdef HAVE_SOCKET ingen_try(world->load_module("socket_server"), "Unable to load socket server module"); - #endif +#endif } // If we don't have a local engine interface (for GUI), use network if (!engine_interface) { ingen_try(world->load_module("client"), "Unable to load client module"); - #ifdef HAVE_SOCKET +#ifdef HAVE_SOCKET ingen_try(world->load_module("socket_client"), "Unable to load socket client module"); - #endif +#endif const char* const uri = conf.option("connect").ptr(); ingen_try(Raul::URI::is_valid(uri), (fmt("Invalid URI <%1%>") % uri).str().c_str()); @@ -170,9 +170,9 @@ main(int argc, char** argv) ingen_try(bool(world->parser()), "Unable to create parser"); - const string path = conf.option("load").is_valid() ? - conf.option("load").ptr() : - conf.files().front(); + const string path = (conf.option("load").is_valid() + ? conf.option("load").ptr() + : conf.files().front()); engine_interface->get(Raul::URI("ingen:/plugins")); engine_interface->get(Node::root_uri()); @@ -216,4 +216,3 @@ main(int argc, char** argv) return 0; } - diff --git a/src/runtime_paths.cpp b/src/runtime_paths.cpp index 8b12f500..6bc92fa1 100644 --- a/src/runtime_paths.cpp +++ b/src/runtime_paths.cpp @@ -107,4 +107,3 @@ module_path(const std::string& name, std::string dir) } } // namespace Ingen - diff --git a/src/serialisation/Parser.cpp b/src/serialisation/Parser.cpp index d49ac9a6..e6e3f2c9 100644 --- a/src/serialisation/Parser.cpp +++ b/src/serialisation/Parser.cpp @@ -226,11 +226,11 @@ parse_properties( static bool parse_arcs( - World* world, - Interface* target, - Sord::Model& model, - const Sord::Node& subject, - const Raul::Path& graph); + World* world, + Interface* target, + Sord::Model& model, + const Sord::Node& subject, + const Raul::Path& graph); static boost::optional parse_block(Ingen::World* world, @@ -647,4 +647,3 @@ Parser::parse_string(Ingen::World* world, } // namespace Serialisation } // namespace Ingen - diff --git a/src/serialisation/serialisation.cpp b/src/serialisation/serialisation.cpp index 65f11090..b335845e 100644 --- a/src/serialisation/serialisation.cpp +++ b/src/serialisation/serialisation.cpp @@ -24,9 +24,11 @@ using namespace Ingen; struct IngenSerialisationModule : public Ingen::Module { virtual void load(Ingen::World* world) { - world->set_parser(SPtr( + world->set_parser( + SPtr( new Serialisation::Parser())); - world->set_serialiser(SPtr( + world->set_serialiser( + SPtr( new Serialisation::Serialiser(*world))); } }; @@ -39,4 +41,3 @@ ingen_module_load() { } } // extern "C" - diff --git a/src/server/ArcImpl.cpp b/src/server/ArcImpl.cpp index eea8ddcb..8b8a23b4 100644 --- a/src/server/ArcImpl.cpp +++ b/src/server/ArcImpl.cpp @@ -104,4 +104,3 @@ ArcImpl::can_connect(const OutputPort* src, const InputPort* dst) } // namespace Server } // namespace Ingen - diff --git a/src/server/BlockImpl.cpp b/src/server/BlockImpl.cpp index 76831436..ad5a233e 100644 --- a/src/server/BlockImpl.cpp +++ b/src/server/BlockImpl.cpp @@ -179,4 +179,3 @@ BlockImpl::set_port_buffer(uint32_t voice, } // namespace Server } // namespace Ingen - diff --git a/src/server/Broadcaster.hpp b/src/server/Broadcaster.hpp index b77773fe..069a0499 100644 --- a/src/server/Broadcaster.hpp +++ b/src/server/Broadcaster.hpp @@ -157,4 +157,3 @@ private: } // namespace Ingen #endif // INGEN_ENGINE_CLIENTBROADCASTER_HPP - diff --git a/src/server/Buffer.cpp b/src/server/Buffer.cpp index 270d95aa..d2a550e5 100644 --- a/src/server/Buffer.cpp +++ b/src/server/Buffer.cpp @@ -151,8 +151,8 @@ Buffer::port_data(PortType port_type) const static inline __m128 mm_abs_ps(__m128 x) { - const __m128 sign_mask = _mm_set1_ps(-0.0f); // -0.0f = 1 << 31 - return _mm_andnot_ps(sign_mask, x); + const __m128 sign_mask = _mm_set1_ps(-0.0f); // -0.0f = 1 << 31 + return _mm_andnot_ps(sign_mask, x); } #endif diff --git a/src/server/Context.hpp b/src/server/Context.hpp index 076622eb..bea43943 100644 --- a/src/server/Context.hpp +++ b/src/server/Context.hpp @@ -113,4 +113,3 @@ protected: } // namespace Ingen #endif // INGEN_ENGINE_CONTEXT_HPP - diff --git a/src/server/GraphImpl.cpp b/src/server/GraphImpl.cpp index f25dcc81..2bb99dc8 100644 --- a/src/server/GraphImpl.cpp +++ b/src/server/GraphImpl.cpp @@ -46,7 +46,7 @@ GraphImpl::GraphImpl(Engine& engine, engine.world()->uris().ingen_Graph, Raul::Symbol("graph"), "Ingen Graph"), - symbol, poly, parent, srate) + symbol, poly, parent, srate) , _engine(engine) , _poly_pre(internal_poly) , _poly_process(internal_poly) diff --git a/src/server/GraphPlugin.hpp b/src/server/GraphPlugin.hpp index 3b1e9bfa..ddd962f1 100644 --- a/src/server/GraphPlugin.hpp +++ b/src/server/GraphPlugin.hpp @@ -60,4 +60,3 @@ private: } // namespace Ingen #endif // INGEN_ENGINE_GRAPHPLUGIN_HPP - diff --git a/src/server/InputPort.cpp b/src/server/InputPort.cpp index cdf70575..04217902 100644 --- a/src/server/InputPort.cpp +++ b/src/server/InputPort.cpp @@ -236,4 +236,3 @@ InputPort::direct_connect() const } // namespace Server } // namespace Ingen - diff --git a/src/server/InternalPlugin.hpp b/src/server/InternalPlugin.hpp index fc5537bf..0e9a2769 100644 --- a/src/server/InternalPlugin.hpp +++ b/src/server/InternalPlugin.hpp @@ -55,4 +55,3 @@ private: } // namespace Ingen #endif // INGEN_ENGINE_INTERNALPLUGIN_HPP - diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp index 8157bdbf..94183e42 100644 --- a/src/server/JackDriver.cpp +++ b/src/server/JackDriver.cpp @@ -93,7 +93,7 @@ JackDriver::attach(const std::string& server_name, JackSessionID, NULL, uuid.c_str()); _engine.log().info(fmt("Connected to JACK as `%1%' (UUID `%2%')\n") - % client_name.c_str() % uuid); + % client_name.c_str() % uuid); } #endif @@ -103,7 +103,7 @@ JackDriver::attach(const std::string& server_name, JackServerName, NULL, server_name.c_str()))) { _engine.log().info(fmt("Connected to JACK server `%1%'\n") - % server_name); + % server_name); } } diff --git a/src/server/LV2Block.cpp b/src/server/LV2Block.cpp index 5e97bfe5..ab46e069 100644 --- a/src/server/LV2Block.cpp +++ b/src/server/LV2Block.cpp @@ -508,4 +508,3 @@ LV2Block::set_port_buffer(uint32_t voice, } // namespace Server } // namespace Ingen - diff --git a/src/server/LV2Block.hpp b/src/server/LV2Block.hpp index a9cf0afc..321fcd9c 100644 --- a/src/server/LV2Block.hpp +++ b/src/server/LV2Block.hpp @@ -113,4 +113,3 @@ protected: } // namespace Ingen #endif // INGEN_ENGINE_LV2BLOCK_HPP - diff --git a/src/server/LV2Plugin.hpp b/src/server/LV2Plugin.hpp index 1bd4822a..6788e41d 100644 --- a/src/server/LV2Plugin.hpp +++ b/src/server/LV2Plugin.hpp @@ -61,4 +61,3 @@ private: } // namespace Ingen #endif // INGEN_ENGINE_LV2PLUGIN_HPP - diff --git a/src/server/PluginImpl.hpp b/src/server/PluginImpl.hpp index 342225ef..b1321e59 100644 --- a/src/server/PluginImpl.hpp +++ b/src/server/PluginImpl.hpp @@ -71,4 +71,3 @@ protected: } // namespace Ingen #endif // INGEN_ENGINE_PLUGINIMPL_HPP - diff --git a/src/server/PreProcessor.hpp b/src/server/PreProcessor.hpp index 26f74d78..37d14486 100644 --- a/src/server/PreProcessor.hpp +++ b/src/server/PreProcessor.hpp @@ -69,4 +69,3 @@ private: } // namespace Ingen #endif // INGEN_ENGINE_PREPROCESSOR_HPP - diff --git a/src/server/events.hpp b/src/server/events.hpp index 24ac8593..9a1346b7 100644 --- a/src/server/events.hpp +++ b/src/server/events.hpp @@ -30,4 +30,3 @@ #include "events/SetPortValue.hpp" #endif // INGEN_ENGINE_EVENTS_HPP - diff --git a/src/server/events/CreateBlock.cpp b/src/server/events/CreateBlock.cpp index 77c0255d..1e1e2228 100644 --- a/src/server/events/CreateBlock.cpp +++ b/src/server/events/CreateBlock.cpp @@ -93,10 +93,10 @@ CreateBlock::pre_process() p->second.get()); if (!(_block = plugin->instantiate(*_engine.buffer_factory(), - Raul::Symbol(_path.symbol()), - polyphonic, - _graph, - _engine))) { + Raul::Symbol(_path.symbol()), + polyphonic, + _graph, + _engine))) { return Event::pre_process_done(Status::CREATION_FAILED, _path); } diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp index a5fea0da..2a1a7994 100644 --- a/src/server/events/CreatePort.cpp +++ b/src/server/events/CreatePort.cpp @@ -197,4 +197,3 @@ CreatePort::post_process() } // namespace Events } // namespace Server } // namespace Ingen - diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp index 91e46c01..90baaa52 100644 --- a/src/server/events/Delta.cpp +++ b/src/server/events/Delta.cpp @@ -395,4 +395,3 @@ Delta::post_process() } // namespace Events } // namespace Server } // namespace Ingen - diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp index 3ea94796..e0931f59 100644 --- a/src/server/events/Disconnect.cpp +++ b/src/server/events/Disconnect.cpp @@ -220,4 +220,3 @@ Disconnect::post_process() } // namespace Events } // namespace Server } // namespace Ingen - diff --git a/src/server/events/DisconnectAll.cpp b/src/server/events/DisconnectAll.cpp index c366508b..ef876ffe 100644 --- a/src/server/events/DisconnectAll.cpp +++ b/src/server/events/DisconnectAll.cpp @@ -169,4 +169,3 @@ DisconnectAll::post_process() } // namespace Events } // namespace Server } // namespace Ingen - diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp index b46f12a7..f7fa5e6a 100644 --- a/src/server/events/Get.cpp +++ b/src/server/events/Get.cpp @@ -161,4 +161,3 @@ Get::post_process() } // namespace Events } // namespace Server } // namespace Ingen - diff --git a/src/server/events/SetPortValue.cpp b/src/server/events/SetPortValue.cpp index 6b149ee2..df0cb06d 100644 --- a/src/server/events/SetPortValue.cpp +++ b/src/server/events/SetPortValue.cpp @@ -126,4 +126,3 @@ SetPortValue::post_process() } // namespace Events } // namespace Server } // namespace Ingen - diff --git a/src/server/internals/Controller.cpp b/src/server/internals/Controller.cpp index 5ac37df4..1f4f75cc 100644 --- a/src/server/internals/Controller.cpp +++ b/src/server/internals/Controller.cpp @@ -148,4 +148,3 @@ ControllerNode::control(ProcessContext& context, uint8_t control_num, uint8_t va } // namespace Internals } // namespace Server } // namespace Ingen - diff --git a/src/server/internals/Delay.cpp b/src/server/internals/Delay.cpp index c528a068..78d2118c 100644 --- a/src/server/internals/Delay.cpp +++ b/src/server/internals/Delay.cpp @@ -207,4 +207,3 @@ DelayNode::process(ProcessContext& context) } // namespace Internals } // namespace Server } // namespace Ingen - diff --git a/src/server/internals/Note.cpp b/src/server/internals/Note.cpp index a1da9f2f..e2ead4b7 100644 --- a/src/server/internals/Note.cpp +++ b/src/server/internals/Note.cpp @@ -75,7 +75,7 @@ NoteNode::NoteNode(InternalPlugin* plugin, _ports->at(1) = _freq_port; _num_port = new OutputPort(bufs, this, Raul::Symbol("number"), 1, _polyphony, - PortType::CV, 0, bufs.forge().make(0.0f)); + PortType::CV, 0, bufs.forge().make(0.0f)); _num_port->set_property(uris.lv2_minimum, bufs.forge().make(0.0f)); _num_port->set_property(uris.lv2_maximum, bufs.forge().make(127.0f)); _num_port->set_property(uris.lv2_portProperty, uris.lv2_integer); @@ -359,4 +359,3 @@ NoteNode::sustain_off(ProcessContext& context, FrameTime time) } // namespace Internals } // namespace Server } // namespace Ingen - diff --git a/src/server/internals/Time.cpp b/src/server/internals/Time.cpp index 22e714b0..6f090257 100644 --- a/src/server/internals/Time.cpp +++ b/src/server/internals/Time.cpp @@ -80,4 +80,3 @@ TimeNode::process(ProcessContext& context) } // namespace Internals } // namespace Server } // namespace Ingen - diff --git a/tests/ingen_test.cpp b/tests/ingen_test.cpp index cbf40817..28b60da7 100644 --- a/tests/ingen_test.cpp +++ b/tests/ingen_test.cpp @@ -56,12 +56,6 @@ using namespace Ingen; World* world = NULL; -/* -class TestClient : public AtomSink { - void write(const LV2_Atom* msg) { - } -}; -*/ class TestClient : public Interface { public: @@ -194,11 +188,6 @@ main(int argc, char** argv) *world->interface().get()); // AtomWriter to serialise responses from the engine - /* - TestClient client; - SPtr atom_writer( - new AtomWriter(world->uri_map(), world->uris(), client)); - */ SPtr client(new TestClient(world->log())); world->interface()->set_respondee(client); @@ -227,7 +216,7 @@ main(int argc, char** argv) sratom_read(sratom, &forge, world->rdf_world()->c_obj(), cmds->c_obj(), subject.c_obj()); - /* +#if 0 cerr << "READ " << out.len << " BYTES" << endl; const LV2_Atom* atom = (const LV2_Atom*)out.buf; cerr << sratom_to_turtle( @@ -235,7 +224,7 @@ main(int argc, char** argv) &world->uri_map().urid_unmap_feature()->urid_unmap, (const char*)cmds_file_uri.buf, NULL, NULL, atom->type, atom->size, LV2_ATOM_BODY(atom)) << endl; - */ +#endif if (!atom_reader.write((const LV2_Atom*)out.buf)) { return EXIT_FAILURE; @@ -259,4 +248,3 @@ main(int argc, char** argv) delete world; return 0; } - -- cgit v1.2.1