mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
fix compiler warnings
This commit is contained in:
parent
38cfa1bb32
commit
809a6d9d2f
@ -140,7 +140,7 @@ void AsyncUtility::
|
|||||||
nap(void) const {
|
nap(void) const {
|
||||||
#ifdef HAVE_IPC
|
#ifdef HAVE_IPC
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
_sleep(1000 * _frequency);
|
_sleep((DWORD)(1000 * _frequency));
|
||||||
#else
|
#else
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
tv.tv_sec = 0;
|
tv.tv_sec = 0;
|
||||||
|
|||||||
@ -36,7 +36,7 @@ const int MAX_RECEIVE_BYTES = 16384;
|
|||||||
Downloader::
|
Downloader::
|
||||||
Downloader(void) {
|
Downloader(void) {
|
||||||
_frequency = downloader_frequency;
|
_frequency = downloader_frequency;
|
||||||
_byte_rate = downloader_byte_rate;
|
_byte_rate = (float) downloader_byte_rate;
|
||||||
_disk_write_frequency = downloader_disk_write_frequency;
|
_disk_write_frequency = downloader_disk_write_frequency;
|
||||||
nassertv(_frequency > 0 && _byte_rate > 0 && _disk_write_frequency > 0);
|
nassertv(_frequency > 0 && _byte_rate > 0 && _disk_write_frequency > 0);
|
||||||
_receive_size = (ulong)(_byte_rate * _frequency);
|
_receive_size = (ulong)(_byte_rate * _frequency);
|
||||||
@ -486,8 +486,7 @@ run(void) {
|
|||||||
_tfirst = t0;
|
_tfirst = t0;
|
||||||
_current_status->_total_bytes = 0;
|
_current_status->_total_bytes = 0;
|
||||||
|
|
||||||
} else if (_current_status->_bytes_in_buffer + _receive_size >
|
} else if (_current_status->_bytes_in_buffer + _receive_size > ((unsigned int)_disk_buffer_size)) {
|
||||||
_disk_buffer_size) {
|
|
||||||
|
|
||||||
// Flush the current buffer if the next request would overflow it
|
// Flush the current buffer if the next request would overflow it
|
||||||
if (downloader_cat.is_debug())
|
if (downloader_cat.is_debug())
|
||||||
@ -607,7 +606,7 @@ run_to_ram(void) {
|
|||||||
_current_status->_total_bytes = 0;
|
_current_status->_total_bytes = 0;
|
||||||
|
|
||||||
} else if (_current_status->_bytes_in_buffer + _receive_size >
|
} else if (_current_status->_bytes_in_buffer + _receive_size >
|
||||||
_disk_buffer_size) {
|
((unsigned int)_disk_buffer_size)) {
|
||||||
|
|
||||||
// Flush the current buffer if the next request would overflow it
|
// Flush the current buffer if the next request would overflow it
|
||||||
if (downloader_cat.is_debug())
|
if (downloader_cat.is_debug())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user