summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/App.cpp4
-rw-r--r--src/gui/ConnectWindow.cpp30
-rw-r--r--src/gui/GraphBox.cpp12
-rw-r--r--src/gui/GraphCanvas.cpp10
-rw-r--r--src/gui/GraphPortModule.cpp2
-rw-r--r--src/gui/GraphTreeWindow.cpp2
-rw-r--r--src/gui/GraphView.cpp6
-rw-r--r--src/gui/GraphWindow.cpp2
-rw-r--r--src/gui/LoadGraphWindow.cpp2
-rw-r--r--src/gui/LoadPluginWindow.cpp2
-rw-r--r--src/gui/MessagesWindow.cpp2
-rw-r--r--src/gui/NodeMenu.cpp2
-rw-r--r--src/gui/NodeModule.cpp12
-rw-r--r--src/gui/ObjectMenu.cpp12
-rw-r--r--src/gui/PluginMenu.cpp4
-rw-r--r--src/gui/Port.cpp8
-rw-r--r--src/gui/PropertiesWindow.cpp6
-rw-r--r--src/gui/RDFS.cpp16
-rw-r--r--src/gui/SubgraphModule.cpp4
-rw-r--r--src/gui/URIEntry.cpp10
-rw-r--r--src/gui/Window.hpp8
-rw-r--r--src/gui/WindowFactory.cpp20
-rw-r--r--src/gui/ingen_gui_lv2.cpp20
23 files changed, 98 insertions, 98 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index 086f7949..f67e4104 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -69,11 +69,11 @@ namespace GUI {
class Port;
-Gtk::Main* App::_main = 0;
+Gtk::Main* App::_main = nullptr;
App::App(Ingen::World* world)
: _style(new Style(*this))
- , _about_dialog(NULL)
+ , _about_dialog(nullptr)
, _window_factory(new WindowFactory(*this))
, _world(world)
, _sample_rate(48000)
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index 012235d1..c4081c97 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -50,19 +50,19 @@ ConnectWindow::ConnectWindow(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml)
: Dialog(cobject)
, _xml(xml)
- , _icon(NULL)
- , _progress_bar(NULL)
- , _progress_label(NULL)
- , _url_entry(NULL)
- , _server_radio(NULL)
- , _port_spinbutton(NULL)
- , _launch_radio(NULL)
- , _internal_radio(NULL)
- , _activate_button(NULL)
- , _deactivate_button(NULL)
- , _disconnect_button(NULL)
- , _connect_button(NULL)
- , _quit_button(NULL)
+ , _icon(nullptr)
+ , _progress_bar(nullptr)
+ , _progress_label(nullptr)
+ , _url_entry(nullptr)
+ , _server_radio(nullptr)
+ , _port_spinbutton(nullptr)
+ , _launch_radio(nullptr)
+ , _internal_radio(nullptr)
+ , _activate_button(nullptr)
+ , _deactivate_button(nullptr)
+ , _disconnect_button(nullptr)
+ , _connect_button(nullptr)
+ , _quit_button(nullptr)
, _mode(Mode::CONNECT_REMOTE)
, _connect_uri("unix:///tmp/ingen.sock")
, _ping_id(-1)
@@ -248,7 +248,7 @@ ConnectWindow::connect(bool existing)
} else if (_mode == Mode::LAUNCH_REMOTE) {
const std::string port = std::to_string(_port_spinbutton->get_value_as_int());
- const char* cmd[] = { "ingen", "-e", "-E", port.c_str(), NULL };
+ const char* cmd[] = { "ingen", "-e", "-E", port.c_str(), nullptr };
if (!Raul::Process::launch(cmd)) {
error("Failed to launch engine process");
@@ -456,7 +456,7 @@ ConnectWindow::gtk_callback()
// Timing stuff for repeated attach attempts
timeval now;
- gettimeofday(&now, NULL);
+ gettimeofday(&now, nullptr);
static const timeval start = now;
static timeval last = now;
static unsigned attempts = 0;
diff --git a/src/gui/GraphBox.cpp b/src/gui/GraphBox.cpp
index 82861a88..1b6e7967 100644
--- a/src/gui/GraphBox.cpp
+++ b/src/gui/GraphBox.cpp
@@ -63,9 +63,9 @@ static const int STATUS_CONTEXT_HOVER = 2;
GraphBox::GraphBox(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml)
: Gtk::VBox(cobject)
- , _app(NULL)
- , _window(NULL)
- , _breadcrumbs(NULL)
+ , _app(nullptr)
+ , _window(nullptr)
+ , _breadcrumbs(nullptr)
, _has_shown_documentation(false)
, _enable_signal(true)
{
@@ -197,7 +197,7 @@ GraphBox::~GraphBox()
SPtr<GraphBox>
GraphBox::create(App& app, SPtr<const GraphModel> graph)
{
- GraphBox* result = NULL;
+ GraphBox* result = nullptr;
Glib::RefPtr<Gtk::Builder> xml = WidgetFactory::create("graph_win");
xml->get_widget_derived("graph_win_vbox", result);
result->init_box(app);
@@ -413,8 +413,8 @@ GraphBox::show_status(const ObjectModel* model)
std::stringstream msg;
msg << model->path();
- const PortModel* port = 0;
- const BlockModel* block = 0;
+ const PortModel* port = nullptr;
+ const BlockModel* block = nullptr;
if ((port = dynamic_cast<const PortModel*>(model))) {
show_port_status(port, port->value());
diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp
index 37af8a5b..8becdb48 100644
--- a/src/gui/GraphCanvas.cpp
+++ b/src/gui/GraphCanvas.cpp
@@ -83,9 +83,9 @@ GraphCanvas::GraphCanvas(App& app,
, _menu_x(0)
, _menu_y(0)
, _paste_count(0)
- , _menu(NULL)
- , _internal_menu(NULL)
- , _plugin_menu(NULL)
+ , _menu(nullptr)
+ , _internal_menu(nullptr)
+ , _plugin_menu(nullptr)
, _human_names(true)
, _show_port_names(true)
, _menu_dirty(false)
@@ -173,7 +173,7 @@ GraphCanvas::GraphCanvas(App& app,
show_human_names(app.world()->conf().option("human-names").get<int32_t>());
show_port_names(app.world()->conf().option("port-labels").get<int32_t>());
- set_port_order(port_order, NULL);
+ set_port_order(port_order, nullptr);
}
void
@@ -402,7 +402,7 @@ GraphCanvas::get_port_view(SPtr<PortModel> port)
}
}
- return NULL;
+ return nullptr;
}
/** Called when a connection is added to the model. */
diff --git a/src/gui/GraphPortModule.cpp b/src/gui/GraphPortModule.cpp
index 7a0ce102..ab375da8 100644
--- a/src/gui/GraphPortModule.cpp
+++ b/src/gui/GraphPortModule.cpp
@@ -46,7 +46,7 @@ GraphPortModule::GraphPortModule(GraphCanvas& canvas,
SPtr<const Client::PortModel> model)
: Ganv::Module(canvas, "", 0, 0, false) // FIXME: coords?
, _model(model)
- , _port(NULL)
+ , _port(nullptr)
{
assert(model);
diff --git a/src/gui/GraphTreeWindow.cpp b/src/gui/GraphTreeWindow.cpp
index 287a6e6c..bba2a735 100644
--- a/src/gui/GraphTreeWindow.cpp
+++ b/src/gui/GraphTreeWindow.cpp
@@ -35,7 +35,7 @@ namespace GUI {
GraphTreeWindow::GraphTreeWindow(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml)
: Window(cobject)
- , _app(NULL)
+ , _app(nullptr)
, _enable_signal(true)
{
xml->get_widget_derived("graphs_treeview", _graphs_treeview);
diff --git a/src/gui/GraphView.cpp b/src/gui/GraphView.cpp
index 591536ac..29a89b16 100644
--- a/src/gui/GraphView.cpp
+++ b/src/gui/GraphView.cpp
@@ -39,8 +39,8 @@ namespace GUI {
GraphView::GraphView(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml)
: Gtk::Box(cobject)
- , _app(NULL)
- , _breadcrumb_container(NULL)
+ , _app(nullptr)
+ , _breadcrumb_container(nullptr)
, _enable_signal(true)
{
property_visible() = false;
@@ -104,7 +104,7 @@ GraphView::set_graph(SPtr<const GraphModel> graph)
SPtr<GraphView>
GraphView::create(App& app, SPtr<const GraphModel> graph)
{
- GraphView* result = NULL;
+ GraphView* result = nullptr;
Glib::RefPtr<Gtk::Builder> xml = WidgetFactory::create("warehouse_win");
xml->get_widget_derived("graph_view_box", result);
result->init(app);
diff --git a/src/gui/GraphWindow.cpp b/src/gui/GraphWindow.cpp
index f4457250..257db8cf 100644
--- a/src/gui/GraphWindow.cpp
+++ b/src/gui/GraphWindow.cpp
@@ -29,7 +29,7 @@ namespace GUI {
GraphWindow::GraphWindow(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml)
: Window(cobject)
- , _box(NULL)
+ , _box(nullptr)
, _position_stored(false)
, _x(0)
, _y(0)
diff --git a/src/gui/LoadGraphWindow.cpp b/src/gui/LoadGraphWindow.cpp
index 5f8f8e11..6fbda227 100644
--- a/src/gui/LoadGraphWindow.cpp
+++ b/src/gui/LoadGraphWindow.cpp
@@ -45,7 +45,7 @@ namespace GUI {
LoadGraphWindow::LoadGraphWindow(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml)
: Gtk::FileChooserDialog(cobject)
- , _app(NULL)
+ , _app(nullptr)
, _merge_ports(false)
{
xml->get_widget("load_graph_symbol_label", _symbol_label);
diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp
index 2c0d1b63..dc743573 100644
--- a/src/gui/LoadPluginWindow.cpp
+++ b/src/gui/LoadPluginWindow.cpp
@@ -240,7 +240,7 @@ get_project_name(SPtr<const PluginModel> plugin)
LilvNode* doap_name = lilv_new_uri(
plugin->lilv_world(), "http://usefulinc.com/ns/doap#name");
LilvNodes* names = lilv_world_find_nodes(
- plugin->lilv_world(), project, doap_name, NULL);
+ plugin->lilv_world(), project, doap_name, nullptr);
if (names) {
name = lilv_node_as_string(lilv_nodes_get_first(names));
diff --git a/src/gui/MessagesWindow.cpp b/src/gui/MessagesWindow.cpp
index a646f2de..581e732c 100644
--- a/src/gui/MessagesWindow.cpp
+++ b/src/gui/MessagesWindow.cpp
@@ -86,7 +86,7 @@ MessagesWindow::log(LV2_URID type, const char* fmt, va_list args)
std::lock_guard<std::mutex> lock(_mutex);
#ifdef HAVE_VASPRINTF
- char* buf = NULL;
+ char* buf = nullptr;
const int len = vasprintf(&buf, fmt, args);
#else
char* buf = g_strdup_vprintf(fmt, args);
diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp
index 13f41502..2a9217ab 100644
--- a/src/gui/NodeMenu.cpp
+++ b/src/gui/NodeMenu.cpp
@@ -44,7 +44,7 @@ namespace GUI {
NodeMenu::NodeMenu(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml)
: ObjectMenu(cobject, xml)
- , _presets_menu(NULL)
+ , _presets_menu(nullptr)
{
xml->get_widget("node_popup_gui_menuitem", _popup_gui_menuitem);
xml->get_widget("node_embed_gui_menuitem", _embed_gui_menuitem);
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index 56fc0e42..d3256178 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -55,8 +55,8 @@ NodeModule::NodeModule(GraphCanvas& canvas,
SPtr<const BlockModel> block)
: Ganv::Module(canvas, block->path().symbol(), 0, 0, true)
, _block(block)
- , _gui_widget(NULL)
- , _gui_window(NULL)
+ , _gui_widget(nullptr)
+ , _gui_window(nullptr)
, _initialised(false)
{
block->signal_new_port().connect(
@@ -284,7 +284,7 @@ NodeModule::embed_gui(bool embed)
}
} else { // un-embed
- Ganv::Module::embed(NULL);
+ Ganv::Module::embed(nullptr);
_plugin_ui.reset();
}
}
@@ -320,7 +320,7 @@ NodeModule::port(SPtr<const PortModel> model)
if (port->model() == model)
return port;
}
- return NULL;
+ return nullptr;
}
void
@@ -388,9 +388,9 @@ void
NodeModule::on_gui_window_close()
{
delete _gui_window;
- _gui_window = NULL;
+ _gui_window = nullptr;
_plugin_ui.reset();
- _gui_widget = NULL;
+ _gui_widget = nullptr;
}
void
diff --git a/src/gui/ObjectMenu.cpp b/src/gui/ObjectMenu.cpp
index df4267df..9c24ebd7 100644
--- a/src/gui/ObjectMenu.cpp
+++ b/src/gui/ObjectMenu.cpp
@@ -34,12 +34,12 @@ namespace GUI {
ObjectMenu::ObjectMenu(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml)
: Gtk::Menu(cobject)
- , _app(NULL)
- , _polyphonic_menuitem(NULL)
- , _disconnect_menuitem(NULL)
- , _rename_menuitem(NULL)
- , _destroy_menuitem(NULL)
- , _properties_menuitem(NULL)
+ , _app(nullptr)
+ , _polyphonic_menuitem(nullptr)
+ , _disconnect_menuitem(nullptr)
+ , _rename_menuitem(nullptr)
+ , _destroy_menuitem(nullptr)
+ , _properties_menuitem(nullptr)
, _enable_signal(false)
{
xml->get_widget("object_learn_menuitem", _learn_menuitem);
diff --git a/src/gui/PluginMenu.cpp b/src/gui/PluginMenu.cpp
index c997bf19..0b353b44 100644
--- a/src/gui/PluginMenu.cpp
+++ b/src/gui/PluginMenu.cpp
@@ -23,7 +23,7 @@ namespace GUI {
PluginMenu::PluginMenu(Ingen::World& world)
: _world(world)
- , _classless_menu(NULL, NULL)
+ , _classless_menu(nullptr, nullptr)
{
clear();
}
@@ -36,7 +36,7 @@ PluginMenu::clear()
const LilvPluginClasses* classes = lilv_world_get_plugin_classes(lworld);
// Empty completely
- _classless_menu = MenuRecord(NULL, NULL);
+ _classless_menu = MenuRecord(nullptr, nullptr);
_class_menus.clear();
items().clear();
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index 88eb8050..28c3c6af 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -163,7 +163,7 @@ Port::update_metadata()
bool
Port::show_menu(GdkEventButton* ev)
{
- PortMenu* menu = NULL;
+ PortMenu* menu = nullptr;
WidgetFactory::get_widget_derived("object_menu", menu);
if (!menu) {
_app.log().error("Failed to load port menu widget\n");
@@ -266,7 +266,7 @@ Port::build_uri_menu()
const Atom& designation_atom = model()->get_property(
_app.uris().lv2_designation);
if (!designation_atom.is_valid()) {
- return NULL;
+ return nullptr;
}
LilvNode* designation = lilv_new_uri(
@@ -277,7 +277,7 @@ Port::build_uri_menu()
// Get every class in the range of the port's property
RDFS::URISet ranges;
LilvNodes* range = lilv_world_find_nodes(
- world->lilv_world(), designation, rdfs_range, NULL);
+ world->lilv_world(), designation, rdfs_range, nullptr);
LILV_FOREACH(nodes, r, range) {
ranges.insert(Raul::URI(lilv_node_as_string(lilv_nodes_get(range, r))));
}
@@ -305,7 +305,7 @@ Port::build_uri_menu()
bool
Port::on_event(GdkEvent* ev)
{
- GraphBox* box = NULL;
+ GraphBox* box = nullptr;
switch (ev->type) {
case GDK_ENTER_NOTIFY:
_entered = true;
diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp
index dfae695a..970b708b 100644
--- a/src/gui/PropertiesWindow.cpp
+++ b/src/gui/PropertiesWindow.cpp
@@ -178,7 +178,7 @@ PropertiesWindow::class_supported(const RDFS::URISet& types)
for (const auto& t : types) {
LilvNode* range = lilv_new_uri(world->lilv_world(), t.c_str());
LilvNodes* instances = lilv_world_find_nodes(
- world->lilv_world(), NULL, rdf_type, range);
+ world->lilv_world(), nullptr, rdf_type, range);
const bool has_instance = (lilv_nodes_size(instances) > 0);
@@ -270,7 +270,7 @@ PropertiesWindow::create_value_widget(const Raul::URI& key,
const Atom& value)
{
if (!type_uri || !Raul::URI::is_valid(type_uri)) {
- return NULL;
+ return nullptr;
}
Raul::URI type(type_uri);
@@ -362,7 +362,7 @@ PropertiesWindow::create_value_widget(const Raul::URI& key,
_app->log().error(fmt("No widget for value type %1%\n") % type);
- return NULL;
+ return nullptr;
}
void
diff --git a/src/gui/RDFS.cpp b/src/gui/RDFS.cpp
index a997af5d..4dd21e28 100644
--- a/src/gui/RDFS.cpp
+++ b/src/gui/RDFS.cpp
@@ -33,7 +33,7 @@ label(World* world, const LilvNode* node)
LilvNode* rdfs_label = lilv_new_uri(
world->lilv_world(), LILV_NS_RDFS "label");
LilvNodes* labels = lilv_world_find_nodes(
- world->lilv_world(), node, rdfs_label, NULL);
+ world->lilv_world(), node, rdfs_label, nullptr);
const LilvNode* first = lilv_nodes_get_first(labels);
std::string label = first ? lilv_node_as_string(first) : "";
@@ -49,7 +49,7 @@ comment(World* world, const LilvNode* node)
LilvNode* rdfs_comment = lilv_new_uri(
world->lilv_world(), LILV_NS_RDFS "comment");
LilvNodes* comments = lilv_world_find_nodes(
- world->lilv_world(), node, rdfs_comment, NULL);
+ world->lilv_world(), node, rdfs_comment, nullptr);
const LilvNode* first = lilv_nodes_get_first(comments);
std::string comment = first ? lilv_node_as_string(first) : "";
@@ -70,9 +70,9 @@ closure(World* world, const LilvNode* pred, URISet& types, bool super)
LilvNode* type = lilv_new_uri(world->lilv_world(), t.c_str());
LilvNodes* matches = (super)
? lilv_world_find_nodes(
- world->lilv_world(), type, pred, NULL)
+ world->lilv_world(), type, pred, nullptr)
: lilv_world_find_nodes(
- world->lilv_world(), NULL, pred, type);
+ world->lilv_world(), nullptr, pred, type);
LILV_FOREACH(nodes, m, matches) {
const LilvNode* klass_node = lilv_nodes_get(matches, m);
if (lilv_node_is_uri(klass_node)) {
@@ -156,12 +156,12 @@ properties(World* world, SPtr<const Client::ObjectModel> model)
LILV_NS_RDFS "domain");
LilvNodes* props = lilv_world_find_nodes(
- world->lilv_world(), NULL, rdf_type, rdf_Property);
+ world->lilv_world(), nullptr, rdf_type, rdf_Property);
LILV_FOREACH(nodes, p, props) {
const LilvNode* prop = lilv_nodes_get(props, p);
if (lilv_node_is_uri(prop)) {
LilvNodes* domains = lilv_world_find_nodes(
- world->lilv_world(), prop, rdfs_domain, NULL);
+ world->lilv_world(), prop, rdfs_domain, nullptr);
unsigned n_matching_domains = 0;
LILV_FOREACH(nodes, d, domains) {
const LilvNode* domain_node = lilv_nodes_get(domains, d);
@@ -203,7 +203,7 @@ instances(World* world, const URISet& types)
for (const auto& t : types) {
LilvNode* type = lilv_new_uri(world->lilv_world(), t.c_str());
LilvNodes* objects = lilv_world_find_nodes(
- world->lilv_world(), NULL, rdf_type, type);
+ world->lilv_world(), nullptr, rdf_type, type);
LILV_FOREACH(nodes, o, objects) {
const LilvNode* object = lilv_nodes_get(objects, o);
if (!lilv_node_is_uri(object)) {
@@ -228,7 +228,7 @@ range(World* world, const LilvNode* prop, bool recursive)
world->lilv_world(), LILV_NS_RDFS "range");
LilvNodes* nodes = lilv_world_find_nodes(
- world->lilv_world(), prop, rdfs_range, NULL);
+ world->lilv_world(), prop, rdfs_range, nullptr);
URISet ranges;
LILV_FOREACH(nodes, n, nodes) {
diff --git a/src/gui/SubgraphModule.cpp b/src/gui/SubgraphModule.cpp
index c261ec36..a932300b 100644
--- a/src/gui/SubgraphModule.cpp
+++ b/src/gui/SubgraphModule.cpp
@@ -52,7 +52,7 @@ SubgraphModule::on_double_click(GdkEventButton* event)
SPtr<GraphModel> parent = dynamic_ptr_cast<GraphModel>(_graph->parent());
GraphWindow* const preferred = ( (parent && (event->state & GDK_SHIFT_MASK))
- ? NULL
+ ? nullptr
: app().window_factory()->graph_window(parent) );
app().window_factory()->present_graph(_graph, preferred);
@@ -89,7 +89,7 @@ SubgraphModule::browse_to_graph()
GraphWindow* const preferred = (parent)
? app().window_factory()->graph_window(parent)
- : NULL;
+ : nullptr;
app().window_factory()->present_graph(_graph, preferred);
}
diff --git a/src/gui/URIEntry.cpp b/src/gui/URIEntry.cpp
index 8e97d906..466948e4 100644
--- a/src/gui/URIEntry.cpp
+++ b/src/gui/URIEntry.cpp
@@ -67,8 +67,8 @@ URIEntry::build_value_menu()
if (lilv_world_ask(world->lilv_world(), inst, rdf_type, rdfs_Class) ||
lilv_world_ask(world->lilv_world(), inst, rdf_type, rdfs_Datatype)) {
// This value is a class or datatype...
- if (!lilv_world_ask(lworld, inst, rdfs_subClassOf, NULL) &&
- !lilv_world_ask(lworld, inst, owl_onDatatype, NULL)) {
+ if (!lilv_world_ask(lworld, inst, rdfs_subClassOf, nullptr) &&
+ !lilv_world_ask(lworld, inst, owl_onDatatype, nullptr)) {
// ... which is not a subtype of another, add menu
add_class_menu_item(menu, inst, label);
}
@@ -102,12 +102,12 @@ URIEntry::build_subclass_menu(const LilvNode* klass)
LilvNode* rdfs_subClassOf = lilv_new_uri(lworld, LILV_NS_RDFS "subClassOf");
LilvNodes* subclasses = lilv_world_find_nodes(
- lworld, NULL, rdfs_subClassOf, klass);
+ lworld, nullptr, rdfs_subClassOf, klass);
LilvNodes* subtypes = lilv_world_find_nodes(
- lworld, NULL, owl_onDatatype, klass);
+ lworld, nullptr, owl_onDatatype, klass);
if (lilv_nodes_size(subclasses) == 0 && lilv_nodes_size(subtypes) == 0) {
- return NULL;
+ return nullptr;
}
Gtk::Menu* menu = new Gtk::Menu();
diff --git a/src/gui/Window.hpp b/src/gui/Window.hpp
index b7a60c76..2a5c9843 100644
--- a/src/gui/Window.hpp
+++ b/src/gui/Window.hpp
@@ -32,8 +32,8 @@ class App;
class Window : public Gtk::Window
{
public:
- Window() : Gtk::Window(), _app(NULL) {}
- explicit Window(BaseObjectType* cobject) : Gtk::Window(cobject), _app(NULL) {}
+ Window() : Gtk::Window(), _app(nullptr) {}
+ explicit Window(BaseObjectType* cobject) : Gtk::Window(cobject), _app(nullptr) {}
virtual void init_window(App& app) { _app = &app; }
@@ -56,8 +56,8 @@ public:
class Dialog : public Gtk::Dialog
{
public:
- Dialog() : Gtk::Dialog(), _app(NULL) {}
- explicit Dialog(BaseObjectType* cobject) : Gtk::Dialog(cobject), _app(NULL) {}
+ Dialog() : Gtk::Dialog(), _app(nullptr) {}
+ explicit Dialog(BaseObjectType* cobject) : Gtk::Dialog(cobject), _app(nullptr) {}
virtual void init_dialog(App& app) { _app = &app; }
diff --git a/src/gui/WindowFactory.cpp b/src/gui/WindowFactory.cpp
index 814123fb..3e3ba199 100644
--- a/src/gui/WindowFactory.cpp
+++ b/src/gui/WindowFactory.cpp
@@ -41,11 +41,11 @@ namespace GUI {
WindowFactory::WindowFactory(App& app)
: _app(app)
- , _main_box(NULL)
- , _load_plugin_win(NULL)
- , _load_graph_win(NULL)
- , _new_subgraph_win(NULL)
- , _properties_win(NULL)
+ , _main_box(nullptr)
+ , _load_plugin_win(nullptr)
+ , _load_graph_win(nullptr)
+ , _new_subgraph_win(nullptr)
+ , _properties_win(nullptr)
{
WidgetFactory::get_widget_derived("load_plugin_win", _load_plugin_win);
WidgetFactory::get_widget_derived("load_graph_win", _load_graph_win);
@@ -108,18 +108,18 @@ GraphWindow*
WindowFactory::graph_window(SPtr<const GraphModel> graph)
{
if (!graph)
- return NULL;
+ return nullptr;
GraphWindowMap::iterator w = _graph_windows.find(graph->path());
- return (w == _graph_windows.end()) ? NULL : w->second;
+ return (w == _graph_windows.end()) ? nullptr : w->second;
}
GraphWindow*
WindowFactory::parent_graph_window(SPtr<const BlockModel> block)
{
if (!block)
- return NULL;
+ return nullptr;
return graph_window(dynamic_ptr_cast<GraphModel>(block->parent()));
}
@@ -162,11 +162,11 @@ WindowFactory::new_graph_window(SPtr<const GraphModel> graph,
{
assert(!view || view->graph() == graph);
- GraphWindow* win = NULL;
+ GraphWindow* win = nullptr;
WidgetFactory::get_widget_derived("graph_win", win);
if (!win) {
_app.log().error("Failed to load graph window widget\n");
- return NULL;
+ return nullptr;
}
win->init_window(_app);
diff --git a/src/gui/ingen_gui_lv2.cpp b/src/gui/ingen_gui_lv2.cpp
index 005ed270..01ddc23e 100644
--- a/src/gui/ingen_gui_lv2.cpp
+++ b/src/gui/ingen_gui_lv2.cpp
@@ -60,10 +60,10 @@ struct IngenLV2AtomSink : public AtomSink {
struct IngenLV2UI {
IngenLV2UI()
: argc(0)
- , argv(NULL)
- , forge(NULL)
- , world(NULL)
- , sink(NULL)
+ , argv(nullptr)
+ , forge(nullptr)
+ , world(nullptr)
+ , sink(nullptr)
{}
int argc;
@@ -97,9 +97,9 @@ instantiate(const LV2UI_Descriptor* descriptor,
Ingen::IngenLV2UI* ui = new Ingen::IngenLV2UI();
- LV2_URID_Map* map = NULL;
- LV2_URID_Unmap* unmap = NULL;
- LV2_Log_Log* log = NULL;
+ LV2_URID_Map* map = nullptr;
+ LV2_URID_Unmap* unmap = nullptr;
+ LV2_Log_Log* log = nullptr;
for (int i = 0; features[i]; ++i) {
if (!strcmp(features[i]->URI, LV2_URID__map)) {
map = (LV2_URID_Map*)features[i]->data;
@@ -117,7 +117,7 @@ instantiate(const LV2UI_Descriptor* descriptor,
if (!ui->world->load_module("client")) {
delete ui;
- return NULL;
+ return nullptr;
}
ui->sink = new Ingen::IngenLV2AtomSink(
@@ -185,7 +185,7 @@ port_event(LV2UI_Handle handle,
static const void*
extension_data(const char* uri)
{
- return NULL;
+ return nullptr;
}
static const LV2UI_Descriptor descriptor = {
@@ -204,6 +204,6 @@ lv2ui_descriptor(uint32_t index)
case 0:
return &descriptor;
default:
- return NULL;
+ return nullptr;
}
}