mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-26 06:18:32 +00:00
VideoCommon/Statistics: Make all member functions non-static
Rather than making Statistics' member functions operate on the global variable instance of itself, we can make these functions member functions and operate on a by-instance state, removing the direct dependency on the global variable itself. This also makes for less reading, as there's no need to repeat "stats." for all variable accesses.
This commit is contained in:
parent
a99c7d01e1
commit
9802a5e16b
4 changed files with 64 additions and 64 deletions
|
@ -51,13 +51,13 @@ static u32 InterpretDisplayList(u32 address, u32 size)
|
|||
if (startAddress != nullptr)
|
||||
{
|
||||
// temporarily swap dl and non-dl (small "hack" for the stats)
|
||||
Statistics::SwapDL();
|
||||
stats.SwapDL();
|
||||
|
||||
Run(DataReader(startAddress, startAddress + size), &cycles, true);
|
||||
INCSTAT(stats.this_frame.num_dlists_called);
|
||||
|
||||
// un-swap
|
||||
Statistics::SwapDL();
|
||||
stats.SwapDL();
|
||||
}
|
||||
|
||||
return cycles;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue