summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-08 09:06:55 +0100
committerDavid Robillard <d@drobilla.net>2019-03-08 09:06:55 +0100
commitacb958e95d0e8ca1b0dd912fe8bbf2e14e5f74e9 (patch)
treea229f986933c8ef9d9c15b36ecf58b04ebeaa7c0 /src/World.cpp
parent112eb3a668f65547b1757978b02cbafebf97b794 (diff)
downloadingen-acb958e95d0e8ca1b0dd912fe8bbf2e14e5f74e9.tar.gz
ingen-acb958e95d0e8ca1b0dd912fe8bbf2e14e5f74e9.tar.bz2
ingen-acb958e95d0e8ca1b0dd912fe8bbf2e14e5f74e9.zip
Pass World everywhere by reference
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 2daff6a6..fd13d643 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -188,7 +188,7 @@ public:
typedef std::map<const std::string, World::InterfaceFactory> InterfaceFactories;
InterfaceFactories interface_factories;
- typedef bool (*ScriptRunner)(World* world, const char* filename);
+ typedef bool (*ScriptRunner)(World& world, const char* filename);
typedef std::map<const std::string, ScriptRunner> ScriptRunners;
ScriptRunners script_runners;
@@ -283,7 +283,7 @@ World::load_module(const char* name)
Module* module = module_load();
if (module) {
module->library = std::move(lib);
- module->load(this);
+ module->load(*this);
_impl->modules.emplace(string(name), module);
return true;
}
@@ -302,7 +302,7 @@ World::run_module(const char* name)
return false;
}
- i->second->run(this);
+ i->second->run(*this);
return true;
}
@@ -318,7 +318,7 @@ World::new_interface(const URI& engine_uri, SPtr<Interface> respondee)
return SPtr<Interface>();
}
- return i->second(this, engine_uri, respondee);
+ return i->second(*this, engine_uri, respondee);
}
/** Run a script of type `mime_type` at filename `filename` */
@@ -331,7 +331,7 @@ World::run(const std::string& mime_type, const std::string& filename)
return false;
}
- return i->second(this, filename.c_str());
+ return i->second(*this, filename.c_str());
}
void