From 82158d1b8b56bd0bcade02613d9dedc83c7f5228 Mon Sep 17 00:00:00 2001 From: Joe Shochet Date: Mon, 29 Jul 2002 17:37:18 +0000 Subject: [PATCH] phases are floats now --- panda/src/downloader/downloadDb.I | 4 ++-- panda/src/downloader/downloadDb.cxx | 6 +++--- panda/src/downloader/downloadDb.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/panda/src/downloader/downloadDb.I b/panda/src/downloader/downloadDb.I index 831d8d957c..168f661b72 100644 --- a/panda/src/downloader/downloadDb.I +++ b/panda/src/downloader/downloadDb.I @@ -63,7 +63,7 @@ get_server_multifile_name(int index) const { // Access: Public // Description: //////////////////////////////////////////////////////////////////// -INLINE Version DownloadDb:: +INLINE Phase DownloadDb:: get_client_multifile_phase(string mfname) const { return (_client_db.get_multifile_record_named(mfname))->_phase; } @@ -73,7 +73,7 @@ get_client_multifile_phase(string mfname) const { // Access: Public // Description: //////////////////////////////////////////////////////////////////// -INLINE Version DownloadDb:: +INLINE Phase DownloadDb:: get_server_multifile_phase(string mfname) const { return (_server_db.get_multifile_record_named(mfname))->_phase; } diff --git a/panda/src/downloader/downloadDb.cxx b/panda/src/downloader/downloadDb.cxx index c350358bc0..8c983a304f 100644 --- a/panda/src/downloader/downloadDb.cxx +++ b/panda/src/downloader/downloadDb.cxx @@ -698,7 +698,7 @@ parse_mfr(uchar *start, int size) { DatagramIterator di(_datagram); PN_int32 mfr_name_length = di.get_int32(); mfr->_name = di.extract_bytes(mfr_name_length); - mfr->_phase = di.get_int32(); + mfr->_phase = di.get_float64(); mfr->_size = di.get_int32(); mfr->_status = di.get_int32(); mfr->_num_files = di.get_int32(); @@ -854,7 +854,7 @@ bool DownloadDb::Db:: write(ofstream &write_stream, bool want_server_info) { // Declare these outside the loop so we do not keep creating // and deleting them - PN_int32 phase; + PN_float64 phase; PN_int32 size; PN_int32 status; PN_int32 num_files; @@ -892,7 +892,7 @@ write(ofstream &write_stream, bool want_server_info) { _datagram.append_data((*i)->_name.c_str(), (*i)->_name.length()); // Add all the properties - _datagram.add_int32(phase); + _datagram.add_float64(phase); _datagram.add_int32(size); _datagram.add_int32(status); _datagram.add_int32(num_files); diff --git a/panda/src/downloader/downloadDb.h b/panda/src/downloader/downloadDb.h index 33b2f10c31..38a343a943 100644 --- a/panda/src/downloader/downloadDb.h +++ b/panda/src/downloader/downloadDb.h @@ -55,7 +55,7 @@ MultifileRecord is a Vector */ typedef int Version; -typedef int Phase; +typedef float Phase; class EXPCL_PANDAEXPRESS DownloadDb { PUBLISHED: @@ -93,8 +93,8 @@ PUBLISHED: INLINE int get_server_multifile_size(string mfname) const; INLINE void set_server_multifile_size(string mfname, int size); - INLINE int get_client_multifile_phase(string mfname) const; - INLINE int get_server_multifile_phase(string mfname) const; + INLINE Phase get_client_multifile_phase(string mfname) const; + INLINE Phase get_server_multifile_phase(string mfname) const; INLINE void set_client_multifile_incomplete(string mfname); INLINE void set_client_multifile_complete(string mfname);