Skip to content

Commit

Permalink
use proper access functions to ResourceData.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Dec 10, 2023
1 parent 4da196a commit 7d0ad48
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/common/fonts/hexfont.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ struct HexDataSource
FScanner sc;

auto data = resf->Read(index);
sc.OpenMem("newconsolefont.hex", (const char*)data.data(), data.size());
sc.OpenMem("newconsolefont.hex", data.string(), data.size());
sc.SetCMode(true);
glyphdata.Push(0); // ensure that index 0 can be used as 'not present'.
while (sc.GetString())
Expand Down
2 changes: 1 addition & 1 deletion src/common/menu/savegamemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ unsigned FSavegameManagerBase::ExtractSaveData(int index)

auto data = resf->Read(info);
FSerializer arc;
if (!arc.OpenReader((const char*)data.data(), data.size()))
if (!arc.OpenReader(data.string(), data.size()))
{
return index;
}
Expand Down
4 changes: 2 additions & 2 deletions src/g_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2013,7 +2013,7 @@ void G_DoLoadGame ()

auto data = resfile->Read(info);
FSerializer arc;
if (!arc.OpenReader((char*)data.data(), data.size()))
if (!arc.OpenReader(data.string(), data.size()))
{
LoadGameError("TXT_FAILEDTOREADSG");
return;
Expand Down Expand Up @@ -2088,7 +2088,7 @@ void G_DoLoadGame ()
}

data = resfile->Read(info);
if (!arc.OpenReader((char*)data.data(), data.size()))
if (!arc.OpenReader(data.string(), data.size()))
{
LoadGameError("TXT_SGINFOERR");
return;
Expand Down
2 changes: 1 addition & 1 deletion src/menu/loadsavemenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void FSavegameManager::ReadSaveStrings()
}
auto data = savegame->Read(info);
FSerializer arc;
if (arc.OpenReader((const char*)data.data(), data.size()))
if (arc.OpenReader(data.string(), data.size()))
{
int savever = 0;
arc("Save Version", savever);
Expand Down

0 comments on commit 7d0ad48

Please sign in to comment.