aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-12-25 16:05:05 -0500
committerDavid Robillard <d@drobilla.net>2017-12-25 16:26:13 -0500
commit71808f61f7db48a7ab4e16537b94ee5686749909 (patch)
tree5529b7c60b2488ac9575ddcb597c905bde577399
parent15b3b0e9f8823752f80c7e597a70749813e61c79 (diff)
downloadingen-71808f61f7db48a7ab4e16537b94ee5686749909.tar.gz
ingen-71808f61f7db48a7ab4e16537b94ee5686749909.tar.bz2
ingen-71808f61f7db48a7ab4e16537b94ee5686749909.zip
Remove superfluous using namespace declarations
-rw-r--r--src/ClashAvoider.cpp8
-rw-r--r--src/LV2Features.cpp2
-rw-r--r--src/Parser.cpp7
-rw-r--r--src/Resource.cpp2
-rw-r--r--src/Serialiser.cpp4
-rw-r--r--src/Store.cpp2
-rw-r--r--src/URIMap.cpp2
-rw-r--r--src/World.cpp4
-rw-r--r--src/client/ClientStore.cpp2
-rw-r--r--src/client/GraphModel.cpp12
-rw-r--r--src/client/PluginModel.cpp8
-rw-r--r--src/client/PluginUI.cpp2
-rw-r--r--src/client/ingen_client.cpp2
-rw-r--r--src/gui/App.cpp12
-rw-r--r--src/gui/BreadCrumbs.cpp2
-rw-r--r--src/gui/ConnectWindow.cpp5
-rw-r--r--src/gui/GraphCanvas.cpp2
-rw-r--r--src/gui/GraphPortModule.cpp2
-rw-r--r--src/gui/GraphTreeWindow.cpp2
-rw-r--r--src/gui/GraphView.cpp2
-rw-r--r--src/gui/LoadGraphWindow.cpp4
-rw-r--r--src/gui/LoadPluginWindow.cpp2
-rw-r--r--src/gui/NewSubgraphWindow.cpp4
-rw-r--r--src/gui/NodeMenu.cpp2
-rw-r--r--src/gui/NodeModule.cpp2
-rw-r--r--src/gui/Port.cpp3
-rw-r--r--src/gui/PropertiesWindow.cpp2
-rw-r--r--src/gui/RenameWindow.cpp14
-rw-r--r--src/gui/Style.cpp6
-rw-r--r--src/gui/SubgraphModule.cpp2
-rw-r--r--src/gui/ThreadedLoader.cpp9
-rw-r--r--src/gui/WidgetFactory.cpp4
-rw-r--r--src/gui/WindowFactory.cpp4
-rw-r--r--src/runtime_paths.cpp6
-rw-r--r--src/server/BlockFactory.cpp2
-rw-r--r--src/server/BlockImpl.cpp2
-rw-r--r--src/server/ControlBindings.cpp2
-rw-r--r--src/server/DuplexPort.cpp2
-rw-r--r--src/server/Engine.cpp2
-rw-r--r--src/server/EventWriter.cpp2
-rw-r--r--src/server/GraphImpl.cpp8
-rw-r--r--src/server/InputPort.cpp2
-rw-r--r--src/server/InternalPlugin.cpp2
-rw-r--r--src/server/JackDriver.cpp12
-rw-r--r--src/server/LV2Block.cpp8
-rw-r--r--src/server/LV2Plugin.cpp6
-rw-r--r--src/server/NodeImpl.cpp2
-rw-r--r--src/server/PortAudioDriver.cpp2
-rw-r--r--src/server/PortImpl.cpp2
-rw-r--r--src/server/PostProcessor.cpp2
-rw-r--r--src/server/PreProcessor.cpp2
-rw-r--r--src/server/ingen_jack.cpp1
-rw-r--r--src/server/ingen_portaudio.cpp1
-rw-r--r--src/server/internals/Controller.cpp2
-rw-r--r--src/server/internals/Note.cpp2
-rw-r--r--src/server/internals/Trigger.cpp2
56 files changed, 61 insertions, 155 deletions
diff --git a/src/ClashAvoider.cpp b/src/ClashAvoider.cpp
index 429b582b..acfdab4e 100644
--- a/src/ClashAvoider.cpp
+++ b/src/ClashAvoider.cpp
@@ -24,8 +24,6 @@
#include "ingen/Store.hpp"
#include "ingen/paths.hpp"
-using namespace std;
-
namespace Ingen {
ClashAvoider::ClashAvoider(const Store& store)
@@ -48,7 +46,7 @@ ClashAvoider::map_path(const Raul::Path& in)
unsigned offset = 0;
bool has_offset = false;
const size_t pos = in.find_last_of('_');
- if (pos != string::npos && pos != (in.length()-1)) {
+ if (pos != std::string::npos && pos != (in.length()-1)) {
const std::string trailing = in.substr(pos + 1);
has_offset = (sscanf(trailing.c_str(), "%u", &offset) > 0);
}
@@ -93,7 +91,7 @@ ClashAvoider::map_path(const Raul::Path& in)
if (o != _offsets.end()) {
offset = ++o->second;
} else {
- string parent_str = in.parent().base();
+ std::string parent_str = in.parent().base();
parent_str = parent_str.substr(0, parent_str.find_last_of("/"));
if (parent_str.empty()) {
parent_str = "/";
@@ -112,7 +110,7 @@ ClashAvoider::map_path(const Raul::Path& in)
name = "_";
}
Raul::Symbol sym(name);
- string str = ss.str();
+ std::string str = ss.str();
InsertRecord i = _symbol_map.insert(
make_pair(in, Raul::Path(str)));
offset = _store.child_name_offset(in.parent(), sym, false);
diff --git a/src/LV2Features.cpp b/src/LV2Features.cpp
index eac86662..356df42c 100644
--- a/src/LV2Features.cpp
+++ b/src/LV2Features.cpp
@@ -18,8 +18,6 @@
#include "ingen/LV2Features.hpp"
-using namespace std;
-
namespace Ingen {
void
diff --git a/src/Parser.cpp b/src/Parser.cpp
index 2115ab74..ed130e94 100644
--- a/src/Parser.cpp
+++ b/src/Parser.cpp
@@ -41,8 +41,6 @@
#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
#define NS_RDFS "http://www.w3.org/2000/01/rdf-schema#"
-using namespace std;
-
namespace Ingen {
std::set<Parser::ResourceRecord>
@@ -194,7 +192,7 @@ get_port(Ingen::World* world,
const std::string subject_str = subject.to_string();
const size_t last_slash = subject_str.find_last_of("/");
- sym = ((last_slash == string::npos)
+ sym = ((last_slash == std::string::npos)
? subject_str
: subject_str.substr(last_slash + 1));
}
@@ -359,7 +357,8 @@ parse_graph(Ingen::World* world,
const Sord::Node& graph = subject;
const Sord::Node nil;
- string graph_path_str = relative_uri(base_uri, subject.to_string(), true);
+ std::string graph_path_str = relative_uri(
+ base_uri, subject.to_string(), true);
if (parent && symbol) {
graph_path_str = parent->child(*symbol);
} else if (parent) {
diff --git a/src/Resource.cpp b/src/Resource.cpp
index 79d7701b..ae44723c 100644
--- a/src/Resource.cpp
+++ b/src/Resource.cpp
@@ -22,8 +22,6 @@
#include "ingen/Resource.hpp"
#include "ingen/URIs.hpp"
-using namespace std;
-
namespace Ingen {
bool
diff --git a/src/Serialiser.cpp b/src/Serialiser.cpp
index 537e7091..2e125953 100644
--- a/src/Serialiser.cpp
+++ b/src/Serialiser.cpp
@@ -47,9 +47,7 @@
#include "sord/sordmm.hpp"
#include "sratom/sratom.h"
-using namespace std;
-using namespace Sord;
-using namespace Ingen;
+using std::string;
namespace Ingen {
diff --git a/src/Store.cpp b/src/Store.cpp
index 056854ee..13e38d37 100644
--- a/src/Store.cpp
+++ b/src/Store.cpp
@@ -19,8 +19,6 @@
#include "ingen/Node.hpp"
#include "ingen/Store.hpp"
-using namespace std;
-
namespace Ingen {
void
diff --git a/src/URIMap.cpp b/src/URIMap.cpp
index 45debcee..1dcf8a24 100644
--- a/src/URIMap.cpp
+++ b/src/URIMap.cpp
@@ -22,8 +22,6 @@
#include "ingen/URIMap.hpp"
#include "raul/URI.hpp"
-using namespace std;
-
namespace Ingen {
URIMap::URIMap(Log& log, LV2_URID_Map* map, LV2_URID_Unmap* unmap)
diff --git a/src/World.cpp b/src/World.cpp
index 8b9c899d..3c9a94db 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -39,7 +39,7 @@
#include "lilv/lilv.h"
#include "sord/sordmm.hpp"
-using namespace std;
+using std::string;
namespace Ingen {
@@ -67,7 +67,7 @@ ingen_load_module(Log& log, const string& name)
string module_path = Glib::getenv("INGEN_MODULE_PATH", module_path_found);
if (module_path_found) {
string dir;
- istringstream iss(module_path);
+ std::istringstream iss(module_path);
while (getline(iss, dir, G_SEARCHPATH_SEPARATOR)) {
string filename = Ingen::module_path(name, dir);
if (Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) {
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index e91277d9..123b9050 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -26,8 +26,6 @@
#include "ingen/client/PortModel.hpp"
#include "ingen/client/SigClientInterface.hpp"
-using namespace std;
-
namespace Ingen {
namespace Client {
diff --git a/src/client/GraphModel.cpp b/src/client/GraphModel.cpp
index e9fce5c4..762ed8ed 100644
--- a/src/client/GraphModel.cpp
+++ b/src/client/GraphModel.cpp
@@ -22,8 +22,6 @@
#include "ingen/client/ClientStore.hpp"
#include "ingen/client/GraphModel.hpp"
-using namespace std;
-
namespace Ingen {
namespace Client {
@@ -99,7 +97,7 @@ GraphModel::clear()
SPtr<ArcModel>
GraphModel::get_arc(const Node* tail, const Node* head)
{
- Arcs::iterator i = _arcs.find(make_pair(tail, head));
+ Arcs::iterator i = _arcs.find(std::make_pair(tail, head));
if (i != _arcs.end()) {
return dynamic_ptr_cast<ArcModel>(i->second);
} else {
@@ -136,9 +134,9 @@ GraphModel::add_arc(SPtr<ArcModel> arc)
assert(arc->tail() == existing->tail());
assert(arc->head() == existing->head());
} else {
- _arcs.insert(make_pair(make_pair(arc->tail().get(),
- arc->head().get()),
- arc));
+ _arcs.emplace(std::make_pair(arc->tail().get(),
+ arc->head().get()),
+ arc);
_signal_new_arc.emit(arc);
}
}
@@ -146,7 +144,7 @@ GraphModel::add_arc(SPtr<ArcModel> arc)
void
GraphModel::remove_arc(const Node* tail, const Node* head)
{
- Arcs::iterator i = _arcs.find(make_pair(tail, head));
+ Arcs::iterator i = _arcs.find(std::make_pair(tail, head));
if (i != _arcs.end()) {
SPtr<ArcModel> arc = dynamic_ptr_cast<ArcModel>(i->second);
_signal_removed_arc.emit(arc);
diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp
index 42422b12..e8bdf12a 100644
--- a/src/client/PluginModel.cpp
+++ b/src/client/PluginModel.cpp
@@ -30,7 +30,7 @@
#include "ingen_config.h"
-using namespace std;
+using std::string;
namespace Ingen {
namespace Client {
@@ -221,9 +221,9 @@ PluginModel::port_scale_points(uint32_t i) const
LilvScalePoints* sp = lilv_port_get_scale_points(_lilv_plugin, port);
LILV_FOREACH(scale_points, i, sp) {
const LilvScalePoint* p = lilv_scale_points_get(sp, i);
- points.insert(
- make_pair(lilv_node_as_float(lilv_scale_point_get_value(p)),
- lilv_node_as_string(lilv_scale_point_get_label(p))));
+ points.emplace(
+ lilv_node_as_float(lilv_scale_point_get_value(p)),
+ lilv_node_as_string(lilv_scale_point_get_label(p)));
}
}
return points;
diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp
index e74b316e..e523c25a 100644
--- a/src/client/PluginUI.cpp
+++ b/src/client/PluginUI.cpp
@@ -23,8 +23,6 @@
#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
#include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
-using namespace std;
-
namespace Ingen {
namespace Client {
diff --git a/src/client/ingen_client.cpp b/src/client/ingen_client.cpp
index f99242b8..fe9d6605 100644
--- a/src/client/ingen_client.cpp
+++ b/src/client/ingen_client.cpp
@@ -19,8 +19,6 @@
#include "ingen_config.h"
-using namespace Ingen;
-
struct IngenClientModule : public Ingen::Module {
void load(Ingen::World* world) {}
};
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index d9e8680c..565f3b19 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -55,8 +55,6 @@
#include "WindowFactory.hpp"
#include "rgba.hpp"
-using namespace std;
-
namespace Raul { class Deletable; }
namespace Ingen {
@@ -247,7 +245,7 @@ App::response(int32_t id, Status status, const std::string& subject)
}
void
-App::error_message(const string& str)
+App::error_message(const std::string& str)
{
_messages_window->post_error(str);
}
@@ -352,7 +350,7 @@ App::status_text() const
void
App::port_activity(Port* port)
{
- std::pair<ActivityPorts::iterator, bool> inserted = _activity_ports.insert(make_pair(port, false));
+ std::pair<ActivityPorts::iterator, bool> inserted = _activity_ports.emplace(port, false);
if (inserted.second) {
inserted.first->second = false;
}
@@ -464,10 +462,10 @@ App::quit(Gtk::Window* dialog_parent)
try {
const std::string path = _world->conf().save(
_world->uri_map(), "ingen", "gui.ttl", Configuration::GUI);
- cout << (fmt("Saved GUI settings to %1%\n") % path);
+ std::cout << (fmt("Saved GUI settings to %1%\n") % path);
} catch (const std::exception& e) {
- cerr << (fmt("Error saving GUI settings (%1%)\n")
- % e.what());
+ std::cerr << (fmt("Error saving GUI settings (%1%)\n")
+ % e.what());
}
return true;
diff --git a/src/gui/BreadCrumbs.cpp b/src/gui/BreadCrumbs.cpp
index 96fc2bdb..693b81e1 100644
--- a/src/gui/BreadCrumbs.cpp
+++ b/src/gui/BreadCrumbs.cpp
@@ -27,7 +27,7 @@
namespace Ingen {
namespace GUI {
-using namespace std;
+using std::string;
BreadCrumbs::BreadCrumbs(App& app)
: Gtk::HBox()
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index a2d674b8..74cba256 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -41,7 +41,6 @@
#include "WindowFactory.hpp"
using namespace Ingen::Client;
-using namespace std;
namespace Ingen {
namespace GUI {
@@ -169,7 +168,7 @@ ConnectWindow::set_connected_to(SPtr<Ingen::Interface> engine)
_port_spinbutton->set_sensitive(true);
}
- _progress_label->set_text(string("Disconnected"));
+ _progress_label->set_text(std::string("Disconnected"));
}
}
@@ -553,7 +552,7 @@ ConnectWindow::gtk_callback()
_connect_button->set_sensitive(true);
_disconnect_button->set_sensitive(false);
_disconnect_button->set_label("gtk-disconnect");
- _progress_label->set_text(string("Disconnected"));
+ _progress_label->set_text(std::string("Disconnected"));
}
return false;
} else {
diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp
index ebb357cf..2d168468 100644
--- a/src/gui/GraphCanvas.cpp
+++ b/src/gui/GraphCanvas.cpp
@@ -53,7 +53,7 @@
#include "WidgetFactory.hpp"
#include "WindowFactory.hpp"
-using namespace std;
+using std::string;
namespace Ingen {
diff --git a/src/gui/GraphPortModule.cpp b/src/gui/GraphPortModule.cpp
index f0c2ce11..7dc24a20 100644
--- a/src/gui/GraphPortModule.cpp
+++ b/src/gui/GraphPortModule.cpp
@@ -34,8 +34,6 @@
#include "WidgetFactory.hpp"
#include "WindowFactory.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
diff --git a/src/gui/GraphTreeWindow.cpp b/src/gui/GraphTreeWindow.cpp
index df47fabf..e5522a74 100644
--- a/src/gui/GraphTreeWindow.cpp
+++ b/src/gui/GraphTreeWindow.cpp
@@ -24,8 +24,6 @@
#include "ingen/client/GraphModel.hpp"
#include "raul/Path.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
diff --git a/src/gui/GraphView.cpp b/src/gui/GraphView.cpp
index bbe28a0f..cb722066 100644
--- a/src/gui/GraphView.cpp
+++ b/src/gui/GraphView.cpp
@@ -28,8 +28,6 @@
#include "GraphView.hpp"
#include "WidgetFactory.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
diff --git a/src/gui/LoadGraphWindow.cpp b/src/gui/LoadGraphWindow.cpp
index b858023d..28eb633a 100644
--- a/src/gui/LoadGraphWindow.cpp
+++ b/src/gui/LoadGraphWindow.cpp
@@ -34,8 +34,6 @@
#include "Style.hpp"
#include "ThreadedLoader.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
@@ -90,7 +88,7 @@ LoadGraphWindow::LoadGraphWindow(BaseObjectType* cobject,
property_select_multiple() = true;
// Add global examples directory to "shortcut folders" (bookmarks)
- const string examples_dir = Ingen::data_file_path("graphs");
+ const std::string examples_dir = Ingen::data_file_path("graphs");
if (Glib::file_test(examples_dir, Glib::FILE_TEST_IS_DIR)) {
add_shortcut_folder(examples_dir);
}
diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp
index c386b970..65f09226 100644
--- a/src/gui/LoadPluginWindow.cpp
+++ b/src/gui/LoadPluginWindow.cpp
@@ -33,7 +33,7 @@
#include "ingen_config.h"
-using namespace std;
+using std::string;
namespace Ingen {
diff --git a/src/gui/NewSubgraphWindow.cpp b/src/gui/NewSubgraphWindow.cpp
index b8459bc6..03455adc 100644
--- a/src/gui/NewSubgraphWindow.cpp
+++ b/src/gui/NewSubgraphWindow.cpp
@@ -24,8 +24,6 @@
#include "NewSubgraphWindow.hpp"
#include "GraphView.hpp"
-using namespace std;
-
namespace Ingen {
namespace GUI {
@@ -73,7 +71,7 @@ NewSubgraphWindow::set_graph(SPtr<const Client::GraphModel> graph)
void
NewSubgraphWindow::name_changed()
{
- string name = _name_entry->get_text();
+ std::string name = _name_entry->get_text();
if (!Raul::Symbol::is_valid(name)) {
_message_label->set_text("Name contains invalid characters.");
_ok_button->property_sensitive() = false;
diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp
index 4c716fde..73564f9d 100644
--- a/src/gui/NodeMenu.cpp
+++ b/src/gui/NodeMenu.cpp
@@ -33,8 +33,6 @@
#include "WidgetFactory.hpp"
#include "WindowFactory.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index 6bc9cfcb..2e81128a 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -43,8 +43,6 @@
#include "WindowFactory.hpp"
#include "ingen_config.h"
-using namespace std;
-
namespace Ingen {
using namespace Client;
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index ebeb5e83..4f8e085e 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -37,7 +37,6 @@
#include "rgba.hpp"
using namespace Ingen::Client;
-using namespace std;
namespace Ingen {
namespace GUI {
@@ -56,7 +55,7 @@ Port::create(App& app,
Port::Port(App& app,
Ganv::Module& module,
SPtr<const PortModel> pm,
- const string& name,
+ const std::string& name,
bool flip)
: Ganv::Port(module, name,
flip ? (!pm->is_input()) : pm->is_input(),
diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp
index 970b708b..c259a92f 100644
--- a/src/gui/PropertiesWindow.cpp
+++ b/src/gui/PropertiesWindow.cpp
@@ -33,8 +33,6 @@
#include "RDFS.hpp"
#include "URIEntry.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
diff --git a/src/gui/RenameWindow.cpp b/src/gui/RenameWindow.cpp
index 8251b03d..c83143d9 100644
--- a/src/gui/RenameWindow.cpp
+++ b/src/gui/RenameWindow.cpp
@@ -26,8 +26,6 @@
#include "App.hpp"
#include "RenameWindow.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
@@ -80,7 +78,7 @@ RenameWindow::present(SPtr<const ObjectModel> object)
void
RenameWindow::values_changed()
{
- const string& symbol = _symbol_entry->get_text();
+ const std::string& symbol = _symbol_entry->get_text();
if (!Raul::Symbol::is_valid(symbol)) {
_message_label->set_text("Invalid symbol");
_ok_button->property_sensitive() = false;
@@ -111,11 +109,11 @@ RenameWindow::cancel_clicked()
void
RenameWindow::ok_clicked()
{
- const URIs& uris = _app->uris();
- const string& symbol_str = _symbol_entry->get_text();
- const string& label = _label_entry->get_text();
- Raul::Path path = _object->path();
- const Atom& name_atom = _object->get_property(uris.lv2_name);
+ const URIs& uris = _app->uris();
+ const std::string& symbol_str = _symbol_entry->get_text();
+ const std::string& label = _label_entry->get_text();
+ Raul::Path path = _object->path();
+ const Atom& name_atom = _object->get_property(uris.lv2_name);
if (!label.empty() && (name_atom.type() != uris.forge.String ||
label != name_atom.ptr<char>())) {
diff --git a/src/gui/Style.cpp b/src/gui/Style.cpp
index 52afd404..81e6fb6c 100644
--- a/src/gui/Style.cpp
+++ b/src/gui/Style.cpp
@@ -30,8 +30,6 @@
#include "Style.hpp"
#include "Port.hpp"
-using namespace std;
-
namespace Ingen {
namespace GUI {
@@ -60,7 +58,7 @@ Style::Style(App& app)
* the default location.
*/
void
-Style::load_settings(string filename)
+Style::load_settings(std::string filename)
{
/* ... */
}
@@ -69,7 +67,7 @@ Style::load_settings(string filename)
* default location.
*/
void
-Style::save_settings(string filename)
+Style::save_settings(std::string filename)
{
/* ... */
}
diff --git a/src/gui/SubgraphModule.cpp b/src/gui/SubgraphModule.cpp
index a932300b..6bbcf534 100644
--- a/src/gui/SubgraphModule.cpp
+++ b/src/gui/SubgraphModule.cpp
@@ -28,8 +28,6 @@
#include "SubgraphModule.hpp"
#include "WindowFactory.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp
index 367f7978..37636c42 100644
--- a/src/gui/ThreadedLoader.cpp
+++ b/src/gui/ThreadedLoader.cpp
@@ -24,8 +24,7 @@
#include "App.hpp"
#include "ThreadedLoader.hpp"
-using namespace boost;
-using namespace std;
+using boost::optional;
namespace Ingen {
namespace GUI {
@@ -116,7 +115,7 @@ ThreadedLoader::load_graph_event(const Glib::ustring& document_uri,
void
ThreadedLoader::save_graph(SPtr<const Client::GraphModel> model,
- const string& filename)
+ const std::string& filename)
{
_mutex.lock();
@@ -131,12 +130,12 @@ ThreadedLoader::save_graph(SPtr<const Client::GraphModel> model,
void
ThreadedLoader::save_graph_event(SPtr<const Client::GraphModel> model,
- const string& filename)
+ const std::string& filename)
{
if (_app.serialiser()) {
std::lock_guard<std::mutex> lock(_app.world()->rdf_mutex());
- if (filename.find(".ingen") != string::npos) {
+ if (filename.find(".ingen") != std::string::npos) {
_app.serialiser()->write_bundle(model, filename);
} else {
_app.serialiser()->start_to_file(model->path(), filename);
diff --git a/src/gui/WidgetFactory.cpp b/src/gui/WidgetFactory.cpp
index 71db9ff4..afb6a07f 100644
--- a/src/gui/WidgetFactory.cpp
+++ b/src/gui/WidgetFactory.cpp
@@ -22,8 +22,6 @@
#include "WidgetFactory.hpp"
-using namespace std;
-
namespace Ingen {
namespace GUI {
@@ -65,7 +63,7 @@ WidgetFactory::find_ui_file()
}
Glib::RefPtr<Gtk::Builder>
-WidgetFactory::create(const string& toplevel_widget)
+WidgetFactory::create(const std::string& toplevel_widget)
{
if (ui_filename.empty()) {
find_ui_file();
diff --git a/src/gui/WindowFactory.cpp b/src/gui/WindowFactory.cpp
index 0fe7a544..7e6afb77 100644
--- a/src/gui/WindowFactory.cpp
+++ b/src/gui/WindowFactory.cpp
@@ -31,8 +31,6 @@
#include "WidgetFactory.hpp"
#include "WindowFactory.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
@@ -224,7 +222,7 @@ WindowFactory::present_load_plugin(SPtr<const GraphModel> graph,
_load_plugin_win->set_default_size(width - width / 8, height / 2);
}
_load_plugin_win->set_title(
- string("Load Plugin - ") + graph->path() + " - Ingen");
+ std::string("Load Plugin - ") + graph->path() + " - Ingen");
_load_plugin_win->present(graph, data);
}
diff --git a/src/runtime_paths.cpp b/src/runtime_paths.cpp
index a51b583a..aeb86433 100644
--- a/src/runtime_paths.cpp
+++ b/src/runtime_paths.cpp
@@ -28,8 +28,6 @@
#include "ingen_config.h"
-using namespace std;
-
namespace Ingen {
static std::string bundle_path;
@@ -51,7 +49,7 @@ set_bundle_path_from_code(void* function)
const char* bin_loc = dli.dli_fname;
#endif
- string bundle = bin_loc;
+ std::string bundle = bin_loc;
bundle = bundle.substr(0, bundle.find_last_of(G_DIR_SEPARATOR));
bundle_path = bundle;
}
@@ -96,7 +94,7 @@ module_path(const std::string& name, std::string dir)
#endif
}
- ret = Glib::Module::build_path(dir, string("ingen_") + name);
+ ret = Glib::Module::build_path(dir, std::string("ingen_") + name);
#ifdef __APPLE__
// MacPorts glib doesnt seem to do portable path building correctly...
diff --git a/src/server/BlockFactory.cpp b/src/server/BlockFactory.cpp
index 62912a21..1cae6f58 100644
--- a/src/server/BlockFactory.cpp
+++ b/src/server/BlockFactory.cpp
@@ -32,8 +32,6 @@
#include "LV2Plugin.hpp"
#include "ThreadManager.hpp"
-using namespace std;
-
namespace Ingen {
namespace Server {
diff --git a/src/server/BlockImpl.cpp b/src/server/BlockImpl.cpp
index 96ae0795..e2c202a8 100644
--- a/src/server/BlockImpl.cpp
+++ b/src/server/BlockImpl.cpp
@@ -28,8 +28,6 @@
#include "RunContext.hpp"
#include "ThreadManager.hpp"
-using namespace std;
-
namespace Ingen {
namespace Server {
diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp
index 454d2be1..7feed87e 100644
--- a/src/server/ControlBindings.cpp
+++ b/src/server/ControlBindings.cpp
@@ -30,8 +30,6 @@
#include "RunContext.hpp"
#include "ThreadManager.hpp"
-using namespace std;
-
namespace Ingen {
namespace Server {
diff --git a/src/server/DuplexPort.cpp b/src/server/DuplexPort.cpp
index 371ee5f4..a9076239 100644
--- a/src/server/DuplexPort.cpp
+++ b/src/server/DuplexPort.cpp
@@ -22,8 +22,6 @@
#include "Engine.hpp"
#include "GraphImpl.hpp"
-using namespace std;
-
namespace Ingen {
namespace Server {
diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp
index 1884e25d..628d0b50 100644
--- a/src/server/Engine.cpp
+++ b/src/server/Engine.cpp
@@ -58,8 +58,6 @@
#include "SocketListener.hpp"
#endif
-using namespace std;
-
namespace Ingen {
namespace Server {
diff --git a/src/server/EventWriter.cpp b/src/server/EventWriter.cpp
index b8a32fcd..ebdf7562 100644
--- a/src/server/EventWriter.cpp
+++ b/src/server/EventWriter.cpp
@@ -22,8 +22,6 @@
#include "EventWriter.hpp"
#include "events.hpp"
-using namespace std;
-
namespace Ingen {
namespace Server {
diff --git a/src/server/GraphImpl.cpp b/src/server/GraphImpl.cpp
index bf1c99bf..ec73a8c8 100644
--- a/src/server/GraphImpl.cpp
+++ b/src/server/GraphImpl.cpp
@@ -32,8 +32,6 @@
#include "PortImpl.hpp"
#include "ThreadManager.hpp"
-using namespace std;
-
namespace Ingen {
namespace Server {
@@ -272,14 +270,14 @@ void
GraphImpl::add_arc(SPtr<ArcImpl> a)
{
ThreadManager::assert_thread(THREAD_PRE_PROCESS);
- _arcs.insert(make_pair(make_pair(a->tail(), a->head()), a));
+ _arcs.emplace(std::make_pair(a->tail(), a->head()), a);
}
SPtr<ArcImpl>
GraphImpl::remove_arc(const PortImpl* tail, const PortImpl* dst_port)
{
ThreadManager::assert_thread(THREAD_PRE_PROCESS);
- Arcs::iterator i = _arcs.find(make_pair(tail, dst_port));
+ Arcs::iterator i = _arcs.find(std::make_pair(tail, dst_port));
if (i != _arcs.end()) {
SPtr<ArcImpl> arc = dynamic_ptr_cast<ArcImpl>(i->second);
_arcs.erase(i);
@@ -293,7 +291,7 @@ bool
GraphImpl::has_arc(const PortImpl* tail, const PortImpl* dst_port) const
{
ThreadManager::assert_thread(THREAD_PRE_PROCESS);
- Arcs::const_iterator i = _arcs.find(make_pair(tail, dst_port));
+ Arcs::const_iterator i = _arcs.find(std::make_pair(tail, dst_port));
return (i != _arcs.end());
}
diff --git a/src/server/InputPort.cpp b/src/server/InputPort.cpp
index 2baa8ff7..2f22491f 100644
--- a/src/server/InputPort.cpp
+++ b/src/server/InputPort.cpp
@@ -30,8 +30,6 @@
#include "RunContext.hpp"
#include "mix.hpp"
-using namespace std;
-
namespace Ingen {
namespace Server {
diff --git a/src/server/InternalPlugin.cpp b/src/server/InternalPlugin.cpp
index c81d7563..17f6fc70 100644
--- a/src/server/InternalPlugin.cpp
+++ b/src/server/InternalPlugin.cpp
@@ -24,8 +24,6 @@
#include "Engine.hpp"
#include "InternalPlugin.hpp"
-using namespace std;
-
namespace Ingen {
namespace Server {
diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp
index a4ae8e7b..433ca758 100644
--- a/src/server/JackDriver.cpp
+++ b/src/server/JackDriver.cpp
@@ -46,8 +46,6 @@
#include "ThreadManager.hpp"
#include "util.hpp"
-using namespace std;
-
typedef jack_default_audio_sample_t jack_sample_t;
namespace Ingen {
@@ -539,16 +537,18 @@ JackDriver::_session_cb(jack_session_event_t* event)
{
_engine.log().info(fmt("Jack session save to %1%\n") % event->session_dir);
- const string cmd = (boost::format("ingen -eg -n %1% -u %2% -l ${SESSION_DIR}")
- % jack_get_client_name(_client)
- % event->client_uuid).str();
+ const std::string cmd = (
+ boost::format("ingen -eg -n %1% -u %2% -l ${SESSION_DIR}")
+ % jack_get_client_name(_client)
+ % event->client_uuid).str();
SPtr<Serialiser> serialiser = _engine.world()->serialiser();
if (serialiser) {
std::lock_guard<std::mutex> lock(_engine.world()->rdf_mutex());
SPtr<Node> root(_engine.root_graph(), NullDeleter<Node>);
- serialiser->write_bundle(root, string("file://") + event->session_dir);
+ serialiser->write_bundle(root,
+ std::string("file://") + event->session_dir);
}
event->command_line = (char*)malloc(cmd.size() + 1);
diff --git a/src/server/LV2Block.cpp b/src/server/LV2Block.cpp
index 05b76737..56ef97a1 100644
--- a/src/server/LV2Block.cpp
+++ b/src/server/LV2Block.cpp
@@ -46,8 +46,6 @@
#include "RunContext.hpp"
#include "Worker.hpp"
-using namespace std;
-
namespace Ingen {
namespace Server {
@@ -367,7 +365,7 @@ LV2Block::instantiate(BufferFactory& bufs, const LilvState* state)
if (!val.type() && (port_type != PortType::ATOM)) {
// Ensure numeric ports have a value, use 0 by default
- val = forge.make(isnan(def_values[j]) ? 0.0f : def_values[j]);
+ val = forge.make(std::isnan(def_values[j]) ? 0.0f : def_values[j]);
}
PortImpl* port = (direction == INPUT)
@@ -382,10 +380,10 @@ LV2Block::instantiate(BufferFactory& bufs, const LilvState* state)
if (direction == INPUT && (port_type == PortType::CONTROL
|| port_type == PortType::CV)) {
port->set_value(val);
- if (!isnan(min_values[j])) {
+ if (!std::isnan(min_values[j])) {
port->set_minimum(forge.make(min_values[j]));
}
- if (!isnan(max_values[j])) {
+ if (!std::isnan(max_values[j])) {
port->set_maximum(forge.make(max_values[j]));
}
}
diff --git a/src/server/LV2Plugin.cpp b/src/server/LV2Plugin.cpp
index 4a4fd674..529e0e4e 100644
--- a/src/server/LV2Plugin.cpp
+++ b/src/server/LV2Plugin.cpp
@@ -25,8 +25,6 @@
#include "LV2Block.hpp"
#include "LV2Plugin.hpp"
-using namespace std;
-
namespace Ingen {
namespace Server {
@@ -68,14 +66,14 @@ LV2Plugin::update_properties()
const Raul::Symbol
LV2Plugin::symbol() const
{
- string working = uri();
+ std::string working = uri();
if (working.back() == '/') {
working = working.substr(0, working.length() - 1);
}
while (working.length() > 0) {
size_t last_slash = working.find_last_of("/");
- const string symbol = working.substr(last_slash+1);
+ const std::string symbol = working.substr(last_slash+1);
if ( (symbol[0] >= 'a' && symbol[0] <= 'z')
|| (symbol[0] >= 'A' && symbol[0] <= 'Z') ) {
return Raul::Symbol::symbolify(symbol);
diff --git a/src/server/NodeImpl.cpp b/src/server/NodeImpl.cpp
index 4a027558..852dfd63 100644
--- a/src/server/NodeImpl.cpp
+++ b/src/server/NodeImpl.cpp
@@ -18,8 +18,6 @@
#include "NodeImpl.hpp"
#include "ThreadManager.hpp"
-using namespace std;
-
namespace Ingen {
namespace Server {
diff --git a/src/server/PortAudioDriver.cpp b/src/server/PortAudioDriver.cpp
index a97f5105..17b5c8cf 100644
--- a/src/server/PortAudioDriver.cpp
+++ b/src/server/PortAudioDriver.cpp
@@ -38,8 +38,6 @@
#include "ThreadManager.hpp"
#include "util.hpp"
-using namespace std;
-
namespace Ingen {
namespace Server {
diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp
index e8486645..c5057e87 100644
--- a/src/server/PortImpl.cpp
+++ b/src/server/PortImpl.cpp
@@ -27,8 +27,6 @@
#include "PortType.hpp"
#include "ThreadManager.hpp"
-using namespace std;
-
namespace Ingen {
namespace Server {
diff --git a/src/server/PostProcessor.cpp b/src/server/PostProcessor.cpp
index 90dd0309..f0a58b18 100644
--- a/src/server/PostProcessor.cpp
+++ b/src/server/PostProcessor.cpp
@@ -21,8 +21,6 @@
#include "PostProcessor.hpp"
#include "RunContext.hpp"
-using namespace std;
-
namespace Ingen {
namespace Server {
diff --git a/src/server/PreProcessor.cpp b/src/server/PreProcessor.cpp
index 6beccd7c..28daa1dd 100644
--- a/src/server/PreProcessor.cpp
+++ b/src/server/PreProcessor.cpp
@@ -29,8 +29,6 @@
#include "ThreadManager.hpp"
#include "UndoStack.hpp"
-using namespace std;
-
namespace Ingen {
namespace Server {
diff --git a/src/server/ingen_jack.cpp b/src/server/ingen_jack.cpp
index 38326c20..a897f130 100644
--- a/src/server/ingen_jack.cpp
+++ b/src/server/ingen_jack.cpp
@@ -26,7 +26,6 @@
#include "JackDriver.hpp"
#include "Engine.hpp"
-using namespace std;
using namespace Ingen;
struct IngenJackModule : public Ingen::Module {
diff --git a/src/server/ingen_portaudio.cpp b/src/server/ingen_portaudio.cpp
index 92ccaa15..e4065342 100644
--- a/src/server/ingen_portaudio.cpp
+++ b/src/server/ingen_portaudio.cpp
@@ -26,7 +26,6 @@
#include "PortAudioDriver.hpp"
#include "Engine.hpp"
-using namespace std;
using namespace Ingen;
struct IngenPortAudioModule : public Ingen::Module {
diff --git a/src/server/internals/Controller.cpp b/src/server/internals/Controller.cpp
index 36c735ce..9f20ee27 100644
--- a/src/server/internals/Controller.cpp
+++ b/src/server/internals/Controller.cpp
@@ -30,8 +30,6 @@
#include "RunContext.hpp"
#include "util.hpp"
-using namespace std;
-
namespace Ingen {
namespace Server {
namespace Internals {
diff --git a/src/server/internals/Note.cpp b/src/server/internals/Note.cpp
index dc282417..b3688dfd 100644
--- a/src/server/internals/Note.cpp
+++ b/src/server/internals/Note.cpp
@@ -34,8 +34,6 @@
// #define NOTE_DEBUG 1
-using namespace std;
-
namespace Ingen {
namespace Server {
namespace Internals {
diff --git a/src/server/internals/Trigger.cpp b/src/server/internals/Trigger.cpp
index 88bfd3f1..8adf211c 100644
--- a/src/server/internals/Trigger.cpp
+++ b/src/server/internals/Trigger.cpp
@@ -30,8 +30,6 @@
#include "internals/Trigger.hpp"
#include "util.hpp"
-using namespace std;
-
namespace Ingen {
namespace Server {
namespace Internals {