From e9d32c25596fd994913ec67306297d05c9463128 Mon Sep 17 00:00:00 2001 From: Ioan Chera Date: Sat, 4 Nov 2023 18:06:32 +0200 Subject: [PATCH] Use ref --- src/Instance.h | 2 +- src/m_loadsave.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Instance.h b/src/Instance.h index 30ca46d4..a6318961 100644 --- a/src/Instance.h +++ b/src/Instance.h @@ -388,7 +388,7 @@ class Instance void EmptyLump(const char *name) const; void FreshLevel(); void LoadBehavior(const Wad_file *load_wad); - void LoadHeader(const Wad_file *load_wad); + void LoadHeader(const Wad_file &load_wad); void LoadLineDefs(const Wad_file *load_wad); void LoadLineDefs_Hexen(const Wad_file *load_wad); void LoadScripts(const Wad_file *load_wad); diff --git a/src/m_loadsave.cc b/src/m_loadsave.cc index 0a7dbb85..5696d984 100644 --- a/src/m_loadsave.cc +++ b/src/m_loadsave.cc @@ -575,9 +575,9 @@ void Instance::ValidateSectorRef(SideDef *sd, int num) } -void Instance::LoadHeader(const Wad_file *load_wad) +void Instance::LoadHeader(const Wad_file &load_wad) { - Lump_c *lump = load_wad->GetLump(load_wad->LevelHeader(loading_level)); + Lump_c *lump = load_wad.GetLump(load_wad.LevelHeader(loading_level)); int length = lump->Length(); @@ -957,7 +957,7 @@ void Instance::LoadLevelNum(const Wad_file *wad, int lev_num) bad_sector_refs = 0; bad_sidedef_refs = 0; - LoadHeader(wad); + LoadHeader(*wad); if (loaded.levelFormat == MapFormat::udmf) {