MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / Peek4

Function Peek4

rapidjson/istreamwrapper.h:79–95  ·  view source on GitHub ↗

For encoding detection only.

Source from the content-addressed store, hash-verified

77
78 // For encoding detection only.
79 const Ch* Peek4() const {
80 RAPIDJSON_ASSERT(sizeof(Ch) == 1); // Only usable for byte stream.
81 int i;
82 bool hasError = false;
83 for (i = 0; i < 4; ++i) {
84 typename StreamType::int_type c = stream_.get();
85 if (c == StreamType::traits_type::eof()) {
86 hasError = true;
87 stream_.clear();
88 break;
89 }
90 peekBuffer_[i] = static_cast<Ch>(c);
91 }
92 for (--i; i >= 0; --i)
93 stream_.putback(peekBuffer_[i]);
94 return !hasError ? peekBuffer_ : 0;
95 }
96
97private:
98 BasicIStreamWrapper(const BasicIStreamWrapper&);

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected