MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / underflow

Method underflow

framework/physfs_fs.cpp:69–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67 }
68
69 int_type underflow() override
70 {
71 if (PHYSFS_eof(file))
72 {
73 return traits_type::eof();
74 }
75 size_t bytesRead = PHYSFS_readBytes(file, buffer.get(), bufferSize);
76 if (bytesRead < 1)
77 {
78 return traits_type::eof();
79 }
80 setg(buffer.get(), buffer.get(), buffer.get() + bytesRead);
81 return static_cast<unsigned char>(*gptr());
82 }
83
84 pos_type seekoff(off_type pos, std::ios_base::seekdir dir,
85 std::ios_base::openmode mode) override

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected