summaryrefslogtreecommitdiff
path: root/src/patcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/patcher.cpp')
-rw-r--r--src/patcher.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/patcher.cpp b/src/patcher.cpp
new file mode 100644
index 00000000..5fdbdf8b
--- /dev/null
+++ b/src/patcher.cpp
@@ -0,0 +1,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;
+}