mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
build on windows
This commit is contained in:
parent
5496c4a9ec
commit
fa67efc870
@ -170,7 +170,7 @@ seekoff(streamoff off, ios_seekdir dir, ios_openmode which) {
|
|||||||
return EOF;
|
return EOF;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_end != 0 && new_pos > _end) {
|
if (_end != (streampos)0 && new_pos > _end) {
|
||||||
// Can't seek past end of file.
|
// Can't seek past end of file.
|
||||||
return EOF;
|
return EOF;
|
||||||
}
|
}
|
||||||
@ -217,7 +217,7 @@ seekoff(streamoff off, ios_seekdir dir, ios_openmode which) {
|
|||||||
return EOF;
|
return EOF;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_end != 0 && new_pos > _end) {
|
if (_end != (streampos)0 && new_pos > _end) {
|
||||||
// Can't seek past end of file.
|
// Can't seek past end of file.
|
||||||
return EOF;
|
return EOF;
|
||||||
}
|
}
|
||||||
@ -261,7 +261,7 @@ overflow(int ch) {
|
|||||||
|
|
||||||
size_t n = pptr() - pbase();
|
size_t n = pptr() - pbase();
|
||||||
if (n != 0) {
|
if (n != 0) {
|
||||||
if (_end != 0 && _ppos + (streampos)n > _end) {
|
if (_end != (streampos)0 && _ppos + (streampos)n > _end) {
|
||||||
// Don't allow reading past the end of the file.
|
// Don't allow reading past the end of the file.
|
||||||
n = (size_t)(_end - _ppos);
|
n = (size_t)(_end - _ppos);
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
@ -347,7 +347,7 @@ underflow() {
|
|||||||
gbump(-(int)buffer_size);
|
gbump(-(int)buffer_size);
|
||||||
|
|
||||||
streamsize num_bytes = buffer_size;
|
streamsize num_bytes = buffer_size;
|
||||||
if (_end != 0 && _gpos + (streampos)num_bytes > _end) {
|
if (_end != (streampos)0 && _gpos + (streampos)num_bytes > _end) {
|
||||||
// Don't allow reading past the end of the file.
|
// Don't allow reading past the end of the file.
|
||||||
streamsize new_num_bytes = _end - _gpos;
|
streamsize new_num_bytes = _end - _gpos;
|
||||||
if (new_num_bytes == 0) {
|
if (new_num_bytes == 0) {
|
||||||
|
@ -521,7 +521,7 @@ do_find_file(const string &filename) const {
|
|||||||
// Search for a file within the local directory.
|
// Search for a file within the local directory.
|
||||||
FileBase tfile(filename);
|
FileBase tfile(filename);
|
||||||
tfile.local_object();
|
tfile.local_object();
|
||||||
Files::iterator fi = _files.find(&tfile);
|
Files::const_iterator fi = _files.find(&tfile);
|
||||||
if (fi != _files.end()) {
|
if (fi != _files.end()) {
|
||||||
return (*fi);
|
return (*fi);
|
||||||
}
|
}
|
||||||
@ -533,7 +533,7 @@ do_find_file(const string &filename) const {
|
|||||||
string remainder = filename.substr(slash + 1);
|
string remainder = filename.substr(slash + 1);
|
||||||
FileBase tfile(dirname);
|
FileBase tfile(dirname);
|
||||||
tfile.local_object();
|
tfile.local_object();
|
||||||
Files::iterator fi = _files.find(&tfile);
|
Files::const_iterator fi = _files.find(&tfile);
|
||||||
if (fi != _files.end()) {
|
if (fi != _files.end()) {
|
||||||
PT(FileBase) file = (*fi);
|
PT(FileBase) file = (*fi);
|
||||||
if (file->is_directory()) {
|
if (file->is_directory()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user