mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
fix negative pstats reporting
This commit is contained in:
parent
8c46644a1c
commit
4190c60ba7
@ -194,6 +194,7 @@ write_data(const unsigned char *data, size_t size, bool compressed) {
|
||||
|
||||
PT(VertexDataSaveBlock) block = (VertexDataSaveBlock *)SimpleAllocator::do_alloc(size);
|
||||
if (block != (VertexDataSaveBlock *)NULL) {
|
||||
_total_file_size = max(_total_file_size, block->get_start() + size);
|
||||
block->set_compressed(compressed);
|
||||
|
||||
#ifdef _WIN32
|
||||
@ -240,8 +241,6 @@ write_data(const unsigned char *data, size_t size, bool compressed) {
|
||||
size -= result;
|
||||
}
|
||||
#endif // _WIN32
|
||||
|
||||
_total_file_size = max(_total_file_size, block->get_start() + size);
|
||||
}
|
||||
|
||||
return block;
|
||||
|
@ -44,11 +44,13 @@ public:
|
||||
size_t max_size);
|
||||
~VertexDataSaveFile();
|
||||
|
||||
PUBLISHED:
|
||||
INLINE bool is_valid() const;
|
||||
|
||||
INLINE size_t get_total_file_size() const;
|
||||
INLINE size_t get_used_file_size() const;
|
||||
|
||||
|
||||
public:
|
||||
PT(VertexDataSaveBlock) write_data(const unsigned char *data, size_t size,
|
||||
bool compressed);
|
||||
bool read_data(unsigned char *data, size_t size,
|
||||
|
Loading…
x
Reference in New Issue
Block a user