X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/c1d3e52e58e86c49f9d04e06ae8e0ece4b98250c..8d20f0f1540c4c116f52e333edc57a4f549927e8:/Code.hpp diff --git a/Code.hpp b/Code.hpp index f6b3312..15a5ffb 100644 --- a/Code.hpp +++ b/Code.hpp @@ -27,26 +27,15 @@ #include "String.hpp" class CYStream : - public std::istream + public std::streambuf { - private: - class CYBuffer : - public std::streambuf - { - public: - CYBuffer(const char *start, const char *end) { - setg(const_cast(start), const_cast(start), const_cast(end)); - } - } buffer_; - public: - CYStream(const char *start, const char *end) : - std::istream(&buffer_), - buffer_(start, end) - { + CYStream(const char *start, const char *end) { + setg(const_cast(start), const_cast(start), const_cast(end)); } }; -CYUTF8String CYPoolCode(CYPool &pool, std::istream &stream); +CYUTF8String CYPoolCode(CYPool &pool, std::streambuf &stream); +CYUTF8String CYPoolCode(CYPool &pool, CYUTF8String code); #endif//CODE_HPP