From e6a376fc606bd28796dd1733af079d5a825c1b52 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 27 Sep 2015 15:14:07 -0700 Subject: Move Functor implementation to header for the API. --- ldid.cpp | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'ldid.cpp') diff --git a/ldid.cpp b/ldid.cpp index 9ed5792..0cb8dd2 100644 --- a/ldid.cpp +++ b/ldid.cpp @@ -923,43 +923,6 @@ class Map { } }; -// I wish Apple cared about providing quality toolchains :/ - -template -class Functor; - -template -class Functor { - public: - virtual Type_ operator ()(Args_... args) const = 0; -}; - -template -class FunctorImpl; - -template -class FunctorImpl : - public Functor -{ - private: - const Value_ *value_; - - public: - FunctorImpl(const Value_ &value) : - value_(&value) - { - } - - virtual Type_ operator ()(Args_... args) const { - return (*value_)(args...); - } -}; - -template -FunctorImpl fun(const Function_ &value) { - return value; -} - namespace ldid { static void Allocate(void *idata, size_t isize, std::streambuf &output, const Functor &allocate, const Functor &save) { -- cgit v1.2.3-56-ge451