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