mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
*** empty log message ***
This commit is contained in:
parent
5d8d9a4892
commit
2a018ab8e0
@ -45,6 +45,7 @@ void Extractor::
|
||||
init(PT(Buffer) buffer) {
|
||||
nassertv(!buffer.is_null());
|
||||
_buffer = buffer;
|
||||
_mfile = NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -54,6 +55,8 @@ init(PT(Buffer) buffer) {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
Extractor::
|
||||
~Extractor(void) {
|
||||
if (_mfile != NULL)
|
||||
delete _mfile;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -84,7 +87,10 @@ initiate(Filename &source_file, const Filename &rel_path) {
|
||||
_total_bytes_read = 0;
|
||||
_read_all_input = false;
|
||||
_handled_all_input = false;
|
||||
_mfile.reset();
|
||||
//_mfile.reset();
|
||||
if (_mfile != NULL)
|
||||
delete _mfile;
|
||||
_mfile = new Multifile;
|
||||
return ES_success;
|
||||
}
|
||||
|
||||
@ -109,9 +115,10 @@ run(void) {
|
||||
// Write to the out file
|
||||
char *start = _buffer->_buffer;
|
||||
int size = _source_buffer_length;
|
||||
if (_mfile.write(start, size, _rel_path) == true) {
|
||||
if (_mfile->write(start, size, _rel_path) == true) {
|
||||
_read_stream.close();
|
||||
_source_file.unlink();
|
||||
delete _mfile;
|
||||
return ES_success;
|
||||
}
|
||||
return ES_ok;
|
||||
|
@ -44,7 +44,7 @@ private:
|
||||
|
||||
ifstream _read_stream;
|
||||
int _source_file_length;
|
||||
Multifile _mfile;
|
||||
Multifile *_mfile;
|
||||
int _total_bytes_read;
|
||||
bool _read_all_input;
|
||||
bool _handled_all_input;
|
||||
|
Loading…
x
Reference in New Issue
Block a user