From df1447c665e6c3631961297a9d3e9aff4e94c47f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 12 Jan 2013 23:38:03 +0000 Subject: Remove Raul::SharedPtr and switch to std::shared_ptr. Use project local short type aliases for shared_ptr and friends. Move Raul::Disposable and Raul::Manageable into Raul::Maid. Use sets to store machina nodes and edges to avoid O(n) searches. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4939 a436a847-0d15-0410-975c-d299462d15a1 --- src/ingen/main.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/ingen') diff --git a/src/ingen/main.cpp b/src/ingen/main.cpp index 3cd2ccf6..c194dcde 100644 --- a/src/ingen/main.cpp +++ b/src/ingen/main.cpp @@ -24,7 +24,6 @@ #include #include "raul/Path.hpp" -#include "raul/SharedPtr.hpp" #include "raul/fmt.hpp" #include "ingen_config.h" @@ -36,6 +35,7 @@ #include "ingen/client/ThreadedSigClientInterface.hpp" #include "ingen/runtime_paths.hpp" #include "ingen/serialisation/Parser.hpp" +#include "ingen/types.hpp" #ifdef WITH_BINDINGS #include "bindings/ingen_bindings.hpp" #endif @@ -97,13 +97,12 @@ main(int argc, char** argv) } // Run engine - SharedPtr engine_interface; + SPtr engine_interface; if (conf.option("engine").get_bool()) { ingen_try(world->load_module("server"), "Unable to load server module"); - ingen_try(world->engine(), - "Unable to create engine"); + ingen_try(bool(world->engine()), "Unable to create engine"); engine_interface = world->interface(); @@ -124,9 +123,10 @@ main(int argc, char** argv) const char* const uri = conf.option("connect").get_string(); ingen_try(Raul::URI::is_valid(uri), (Raul::fmt("Invalid URI <%1%>") % uri).str().c_str()); - SharedPtr client(new Client::ThreadedSigClientInterface(1024)); - ingen_try((engine_interface = world->new_interface(Raul::URI(uri), client)), - (string("Unable to create interface to `") + uri + "'").c_str()); + SPtr client(new Client::ThreadedSigClientInterface(1024)); + engine_interface = world->new_interface(Raul::URI(uri), client); + ingen_try(bool(engine_interface), + (Raul::fmt("Unable to create interface to `%1%'") % uri).str().c_str()); } world->set_interface(engine_interface); @@ -168,8 +168,7 @@ main(int argc, char** argv) } } - ingen_try(world->parser(), - "Unable to create parser"); + ingen_try(bool(world->parser()), "Unable to create parser"); const string path = conf.option("load").is_valid() ? conf.option("load").get_string() : -- cgit v1.2.1