[cgma-dev] r4793 - cgm/trunk/geom/OCC
hongjun at mcs.anl.gov
hongjun at mcs.anl.gov
Tue May 3 10:05:04 CDT 2011
Author: hongjun
Date: 2011-05-03 10:05:04 -0500 (Tue, 03 May 2011)
New Revision: 4793
Modified:
cgm/trunk/geom/OCC/OCCQueryEngine.cpp
Log:
o "OCCQueryEngine::Write" using buffer is reverted to use "b_write_buffer" flag
o Passes make check
Modified: cgm/trunk/geom/OCC/OCCQueryEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCQueryEngine.cpp 2011-05-03 01:16:35 UTC (rev 4792)
+++ cgm/trunk/geom/OCC/OCCQueryEngine.cpp 2011-05-03 15:05:04 UTC (rev 4793)
@@ -1364,16 +1364,17 @@
long size=infile.tellg();
infile.seekg(0);
- if(n_buffer_size < size)
- {
- PRINT_ERROR("Buffer size is not enough, increase buffer size.\n");
- infile.close();
- remove(file_name);
- return CUBIT_FAILURE;
+ if (b_write_buffer) {
+ if(n_buffer_size < size) {
+ PRINT_ERROR("Buffer size is not enough, increase buffer size.\n");
+ infile.close();
+ remove(file_name);
+ return CUBIT_FAILURE;
+ }
+ infile.read(pBuffer,size);
}
else n_buffer_size = size;
- infile.read(pBuffer,size);
infile.close();
remove(file_name);
return CUBIT_TRUE;
More information about the cgma-dev
mailing list