summaryrefslogtreecommitdiffstats
path: root/src/ingen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-12 23:38:03 +0000
committerDavid Robillard <d@drobilla.net>2013-01-12 23:38:03 +0000
commitdf1447c665e6c3631961297a9d3e9aff4e94c47f (patch)
treec0ff117c362e6d571f430f886ab62f372b59af08 /src/ingen
parentbb335dca695273622b7a4ebbefbe9e089edb9ab4 (diff)
downloadingen-df1447c665e6c3631961297a9d3e9aff4e94c47f.tar.gz
ingen-df1447c665e6c3631961297a9d3e9aff4e94c47f.tar.bz2
ingen-df1447c665e6c3631961297a9d3e9aff4e94c47f.zip
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
Diffstat (limited to 'src/ingen')
-rw-r--r--src/ingen/main.cpp17
1 files changed, 8 insertions, 9 deletions
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 <glibmm/timer.h>
#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<Interface> engine_interface;
+ SPtr<Interface> 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<Interface> 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<Interface> 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() :