Move linecrosskludge off of entityclass

This is a temporary vector that only gets used in mapclass::gotoroom().
It's always guaranteed to be cleared, so it's safe to move it off.

I'm fine with using references here because, like, it's a C++ STL vector
anyway - when we switch away from the STL (which is a precondition for
moving to C), we'll be passing around raw pointers here instead, and
won't be using references here anyway.
This commit is contained in:
Misa
2021-04-16 23:12:32 -07:00
committed by Misa Elizabeth Kai
parent 382b83a54d
commit 75ed9f9631
3 changed files with 12 additions and 14 deletions

View File

@@ -1148,7 +1148,7 @@ void entityclass::removetrigger( int t )
}
}
void entityclass::copylinecross( int t )
void entityclass::copylinecross(std::vector<entclass>& linecrosskludge, int t)
{
if (!INBOUNDS_VEC(t, entities))
{
@@ -1159,7 +1159,7 @@ void entityclass::copylinecross( int t )
linecrosskludge.push_back(entities[t]);
}
void entityclass::revertlinecross( int t, int s )
void entityclass::revertlinecross(std::vector<entclass>& linecrosskludge, int t, int s)
{
if (!INBOUNDS_VEC(t, entities) || !INBOUNDS_VEC(s, linecrosskludge))
{