mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
fixes for VC
This commit is contained in:
parent
e202ad39ad
commit
b1fdbd2747
@ -418,6 +418,7 @@ repack() {
|
||||
Filename orig_name = _multifile_name;
|
||||
temp.close();
|
||||
close();
|
||||
orig_name.unlink();
|
||||
if (!temp_filename.rename_to(orig_name)) {
|
||||
express_cat.info()
|
||||
<< "Unable to rename temporary file " << temp_filename << " to "
|
||||
@ -666,7 +667,7 @@ extract_subfile_to(int index, ostream &out) {
|
||||
byte = in.get();
|
||||
}
|
||||
|
||||
bool failed = in.fail();
|
||||
bool failed = (in.fail() && !in.eof());
|
||||
close_subfile();
|
||||
nassertr(!failed, false);
|
||||
|
||||
@ -716,7 +717,7 @@ open_read_subfile(int index) {
|
||||
// that references into the open Multifile istream.
|
||||
nassertr(_open_subfile->_data_start != (streampos)0, empty_stream);
|
||||
_subfile_substream.open(_read, _open_subfile->_data_start,
|
||||
_open_subfile->_data_start + _open_subfile->_data_length);
|
||||
_open_subfile->_data_start + (streampos)_open_subfile->_data_length);
|
||||
return _subfile_substream;
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ seekoff(streamoff off, ios::seek_dir dir, int mode) {
|
||||
// internal buffer is filled, plus one character.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
int SubStreamBuf::
|
||||
SubStreamBuf::overflow(int c) {
|
||||
overflow(int c) {
|
||||
// We don't support ostream.
|
||||
|
||||
/*
|
||||
@ -178,7 +178,7 @@ underflow() {
|
||||
|
||||
size_t buffer_size = egptr() - eback();
|
||||
size_t num_bytes;
|
||||
if (_end - _cur > buffer_size) {
|
||||
if (_end - _cur > (streampos)buffer_size) {
|
||||
// We have enough bytes in the input stream to fill our buffer.
|
||||
num_bytes = buffer_size;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user