added STL compatible access functions to TArray.

This allows using them in templates made for STL containers.
This commit is contained in:
Christoph Oelckers 2023-12-10 08:58:11 +01:00
commit 41573df58f
3 changed files with 42 additions and 6 deletions

View file

@ -150,7 +150,7 @@ bool FScanner::OpenFile (const char *name)
auto filebuff = fr.Read();
if (filebuff.size() == 0 && filesize > 0) return false;
ScriptBuffer = FString((const char *)filebuff.data(), filesize);
ScriptBuffer = FString(filebuff.string(), filesize);
ScriptName = name; // This is used for error messages so the full file name is preferable
LumpNum = -1;
PrepareScript ();