refactor: change pointer parameters to references for Level and Content in various classes
This commit is contained in:
@@ -152,7 +152,7 @@ static void load_world(
|
||||
auto& packs = engine.getContentPacks();
|
||||
auto& settings = engine.getSettings();
|
||||
|
||||
auto level = World::load(worldFiles, settings, content, packs);
|
||||
auto level = World::load(worldFiles, settings, *content, packs);
|
||||
engine.onWorldOpen(std::move(level));
|
||||
} catch (const world_load_error& error) {
|
||||
guiutil::alert(
|
||||
@@ -164,7 +164,7 @@ static void load_world(
|
||||
}
|
||||
|
||||
void EngineController::openWorld(const std::string& name, bool confirmConvert) {
|
||||
auto& paths = engine.getPaths();
|
||||
const auto& paths = engine.getPaths();
|
||||
auto folder = paths.getWorldsFolder() / fs::u8path(name);
|
||||
auto worldFile = folder / fs::u8path("world.json");
|
||||
if (!fs::exists(worldFile)) {
|
||||
@@ -245,7 +245,7 @@ void EngineController::createWorld(
|
||||
folder,
|
||||
seed,
|
||||
engine.getSettings(),
|
||||
engine.getContent(),
|
||||
*engine.getContent(),
|
||||
engine.getContentPacks()
|
||||
);
|
||||
if (!engine.isHeadless()) {
|
||||
|
||||
Reference in New Issue
Block a user