Skip to content

Commit

Permalink
use vector instead of array
Browse files Browse the repository at this point in the history
  • Loading branch information
pmatos committed Jul 17, 2024
1 parent a4b0484 commit b84a400
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions FEXCore/Source/Interface/IR/Passes/x87StackOptimizationPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,7 @@ class FixedSizeStack {
int8_t TopOffset = 0;

FixedSizeStack()
: buffer({{StackSlot::UNUSED, {}},
{StackSlot::UNUSED, {}},
{StackSlot::UNUSED, {}},
{StackSlot::UNUSED, {}},
{StackSlot::UNUSED, {}},
{StackSlot::UNUSED, {}},
{StackSlot::UNUSED, {}},
{StackSlot::UNUSED, {}}}) {}
: buffer(FixedSizeStack::size, {StackSlot::UNUSED, T()}) {}

void push(const T& Value) {
rotate();
Expand Down Expand Up @@ -146,7 +139,7 @@ class FixedSizeStack {
}

private:
std::array<std::pair<StackSlot, T>, size> buffer;
fextl::vector<std::pair<StackSlot, T>> buffer;
};

class X87StackOptimization final : public Pass {
Expand Down

0 comments on commit b84a400

Please sign in to comment.