Adding std::vector storing all fakes.
This commit is contained in:
parent
1739ccc619
commit
1e4f54fe68
2
Fake.h
2
Fake.h
@ -16,6 +16,7 @@ namespace spy
|
||||
*/
|
||||
|
||||
template <typename H, typename ReturnType, typename... ArgTypes>
|
||||
extern std::vector<Fake *> fake_list;
|
||||
class Fake
|
||||
{
|
||||
public:
|
||||
@ -33,6 +34,7 @@ Fake(H& hook, ReturnType (*func)(ArgTypes...))
|
||||
:hook_(hook)
|
||||
{
|
||||
func_ = hook_.patch(func);
|
||||
fake_list.push_back(&this);
|
||||
}
|
||||
|
||||
template <typename H, typename ReturnType, typename... ArgTypes>
|
||||
|
Loading…
Reference in New Issue
Block a user