mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-17 12:12:10 -04:00
minor vfs tweaks
This commit is contained in:
parent
18605b1668
commit
a0220f786c
@ -115,11 +115,14 @@ skip_bytes(size_t size) {
|
||||
// Function: StreamReader::extract_bytes
|
||||
// Access: Published
|
||||
// Description: Extracts the indicated number of bytes in the
|
||||
// stream and returns them as a string.
|
||||
// stream and returns them as a string. Returns empty
|
||||
// string at end-of-file.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
string StreamReader::
|
||||
extract_bytes(size_t size) {
|
||||
nassertr(!_in->eof() && !_in->fail(), string());
|
||||
if (_in->eof() || _in->fail()) {
|
||||
return string();
|
||||
}
|
||||
|
||||
char *buffer = (char *)alloca(size);
|
||||
_in->read(buffer, size);
|
||||
|
@ -32,6 +32,7 @@ public:
|
||||
const Filename &local_filename,
|
||||
bool implicit_pz_file);
|
||||
|
||||
PUBLISHED:
|
||||
virtual VirtualFileSystem *get_file_system() const;
|
||||
INLINE VirtualFileMount *get_mount() const;
|
||||
virtual Filename get_filename() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user