[parchive2-cvs] library/src/slice file_slice.cc,1.25,1.26 file_slice.h,1.8,1.9
Status: Pre-Alpha
Brought to you by:
coppit
|
From: <gu...@us...> - 2003-05-07 09:13:15
|
Update of /cvsroot/parchive2/library/src/slice
In directory sc8-pr-cvs1:/tmp/cvs-serv31023
Modified Files:
file_slice.cc file_slice.h
Log Message:
Just checked to make sure everything was working, was delightfully (well....) surprised to find that two assertions were failing. Was checking a non pointer against the NULL value.. dunno why it even compiled. Anyway- the library is again creating/restoring data.
Index: file_slice.cc
===================================================================
RCS file: /cvsroot/parchive2/library/src/slice/file_slice.cc,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** file_slice.cc 7 May 2003 03:13:54 -0000 1.25
--- file_slice.cc 7 May 2003 09:13:11 -0000 1.26
***************
*** 90,95 ****
(*file).seekg(offset);
! if(((*file).read(slice_bytes, size)) == NULL)
! assert(false);
// Make sure we zero pad the rest
--- 90,96 ----
(*file).seekg(offset);
! if(&((*file).read(slice_bytes, size)) == NULL)
! assert(false);
!
// Make sure we zero pad the rest
***************
*** 132,136 ****
(*file).seekp(offset);
! if(((*file).write(slice_bytes, size)) == NULL)
assert(false);
--- 133,137 ----
(*file).seekp(offset);
! if(&((*file).write(slice_bytes, size)) == NULL)
assert(false);
Index: file_slice.h
===================================================================
RCS file: /cvsroot/parchive2/library/src/slice/file_slice.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** file_slice.h 7 May 2003 01:39:22 -0000 1.8
--- file_slice.h 7 May 2003 09:13:12 -0000 1.9
***************
*** 34,40 ****
protected:
// We know what to read/write, our own data
void Read_From_File() const;
void Write_To_File();
!
bool autoflush;
mutable bool gotbytes;
--- 34,41 ----
protected:
// We know what to read/write, our own data
+
void Read_From_File() const;
void Write_To_File();
!
bool autoflush;
mutable bool gotbytes;
|