summaryrefslogtreecommitdiffstats
path: root/src/core/patcher.cpp
blob: 5fdbdf8b2161269c6b8357d42dd7b482764c0caa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "common.h"
#include "patcher.h"

StaticPatcher *StaticPatcher::ms_head;

StaticPatcher::StaticPatcher(Patcher func)
 : m_func(func)
{
	m_next = ms_head;
	ms_head = this;
}

void
StaticPatcher::Apply()
{
	StaticPatcher *current = ms_head;
	while(current){
		current->Run();
		current = current->m_next;
	}
	ms_head = nil;
}