builtin: Switch to correct get_x() nullptr convention
This commit is contained in:
parent
54e1ec778a
commit
533c96e17d
@ -455,7 +455,7 @@ struct Module: public interface::Module, public ground_plane_lighting::Interface
|
||||
{
|
||||
auto it = m_instances.find(scene_ref);
|
||||
if(it == m_instances.end())
|
||||
throw Exception("get_instance(): Scene does not have gpl");
|
||||
return nullptr;
|
||||
return it->second.get();
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ namespace voxelworld
|
||||
std::function<void(voxelworld::Instance *instance)> cb)
|
||||
{
|
||||
return access(server, [&](voxelworld::Interface *i){
|
||||
voxelworld::Instance *instance = i->get_instance(scene_ref);
|
||||
voxelworld::Instance *instance = check(i->get_instance(scene_ref));
|
||||
cb(instance);
|
||||
});
|
||||
}
|
||||
|
@ -1209,8 +1209,7 @@ struct Module: public interface::Module, public voxelworld::Interface
|
||||
{
|
||||
auto it = m_instances.find(scene_ref);
|
||||
if(it == m_instances.end())
|
||||
throw Exception("get_instance(): Scene does not have a voxel"
|
||||
" world instance");
|
||||
return nullptr;
|
||||
return it->second.get();
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ namespace worldgen
|
||||
std::function<void(worldgen::Instance *instance)> cb)
|
||||
{
|
||||
return access(server, [&](worldgen::Interface *i){
|
||||
worldgen::Instance *instance = i->get_instance(scene_ref);
|
||||
worldgen::Instance *instance = check(i->get_instance(scene_ref));
|
||||
cb(instance);
|
||||
});
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ struct Module: public interface::Module, public Interface
|
||||
{
|
||||
auto it = m_instances.find(scene_ref);
|
||||
if(it == m_instances.end())
|
||||
throw Exception("get_instance(): Scene does not have worldgen");
|
||||
return nullptr;
|
||||
return it->second.get();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user