diff options
Diffstat (limited to 'src/patcher.cpp')
-rw-r--r-- | src/patcher.cpp | 22 |
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; +} |