From: mpv Date: Mon, 11 Jan 2021 09:00:29 +0000 (+0300) Subject: # fixes for the compilation errors and warnings X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=ed12bd92e189fb2e4c967b16edcc718a6a444c99;p=occt-copy.git # fixes for the compilation errors and warnings --- diff --git a/src/BinObjMgt/BinObjMgt_Persistent.cxx b/src/BinObjMgt/BinObjMgt_Persistent.cxx index d8900ed810..4bfc476dd6 100644 --- a/src/BinObjMgt/BinObjMgt_Persistent.cxx +++ b/src/BinObjMgt/BinObjMgt_Persistent.cxx @@ -54,8 +54,8 @@ BinObjMgt_Persistent::BinObjMgt_Persistent () myOffset(BP_HEADSIZE), mySize (BP_HEADSIZE), myIsError (Standard_False), - myIStream (NULL), myOStream (NULL), + myIStream (NULL), myDirectWritingIsEnabled (Standard_False) { Init(); @@ -153,7 +153,8 @@ Standard_IStream& BinObjMgt_Persistent::Read (Standard_IStream& theIS) aData[1] = InverseInt (aData[1]); aData[2] = InverseInt (aData[2]); #endif - if (myDirectWritingIsEnabled = (aData[1] < 0)) + myDirectWritingIsEnabled = aData[1] < 0; + if (myDirectWritingIsEnabled) aData[1] = -aData[1]; if (theIS && aData[2] > 0) { mySize += aData[2]; diff --git a/src/BinTools/BinTools_ShapeReader.hxx b/src/BinTools/BinTools_ShapeReader.hxx index 1af5fcf45a..577100e0a9 100644 --- a/src/BinTools/BinTools_ShapeReader.hxx +++ b/src/BinTools/BinTools_ShapeReader.hxx @@ -26,12 +26,6 @@ class Poly_Polygon3D; class Poly_PolygonOnTriangulation; class Poly_Triangulation; -//! Computes a hash code for the given value of the uint64_t type, in range [1, theUpperBound] -inline Standard_Integer HashCode (const uint64_t theValue, const Standard_Integer theUpperBound) -{ - return IntegerHashCode(theValue, 0xffffffffffffffff, theUpperBound); -} - //! Reads topology from IStream in binary format without grouping of objects by types //! and using relative positions in a file as references. class BinTools_ShapeReader : public BinTools_ShapeSetBase diff --git a/src/BinTools/BinTools_ShapeSetBase.hxx b/src/BinTools/BinTools_ShapeSetBase.hxx index 2a09175a20..e2c1a6fea2 100644 --- a/src/BinTools/BinTools_ShapeSetBase.hxx +++ b/src/BinTools/BinTools_ShapeSetBase.hxx @@ -29,6 +29,12 @@ class gp_Pnt; //! Writes to the stream a gp_Pnt data Standard_OStream& operator << (Standard_OStream& OS, const gp_Pnt P); +//! Computes a hash code for the given value of the uint64_t type, in range [1, theUpperBound] +inline Standard_Integer HashCode (const uint64_t theValue, const Standard_Integer theUpperBound) +{ + return IntegerHashCode(theValue, 0xffffffffffffffff, theUpperBound); +} + //! A base class for all readers/writers of TopoDS_Shape into/from stream. class BinTools_ShapeSetBase { diff --git a/tests/caf/progress/A1 b/tests/caf/progress/A1 index e6ff3db139..ad79274857 100644 --- a/tests/caf/progress/A1 +++ b/tests/caf/progress/A1 @@ -25,9 +25,7 @@ set output [SaveAs Doc ${imagedir}/testA1.cbf] Close Doc # Test data -set ctr { "0%" "Writing document" "Writing sub tree" - "Writing geometry" "Writing 2D curves" "Writing curves" - "Writing surfases" "Writing shapes" "100%" } +set ctr { "0%" "Writing document" "Writing sub tree" "100%" } foreach data ${ctr} { if ![regexp $data $output] { diff --git a/tests/caf/progress/B1 b/tests/caf/progress/B1 index 6bd7155ea4..7371c42dad 100644 --- a/tests/caf/progress/B1 +++ b/tests/caf/progress/B1 @@ -25,8 +25,7 @@ set output [Open ${bDoc} Doc] Close Doc # Test data -set ctr {"0%" "Reading data" "Reading geometry" "Reading curves 2d" - "Reading surfaces" "Reading Shapes" "Reading sub tree" "100%" } +set ctr {"0%" "Reading data" "Reading sub tree" "100%" } foreach data ${ctr} { if ![regexp $data $output] { diff --git a/tests/caf/progress/C1 b/tests/caf/progress/C1 index c1c39eb2fc..7eefdee749 100644 --- a/tests/caf/progress/C1 +++ b/tests/caf/progress/C1 @@ -31,9 +31,7 @@ set output [Save Doc] Close Doc # Test data -set ctr { "0%" "Writing document" "Writing sub tree" - "Writing geometry" "Writing 2D curves" "Writing curves" - "Writing surfases" "Writing shapes" "100%" } +set ctr { "0%" "Writing document" "Writing sub tree" "100%" } foreach data ${ctr} { if ![regexp $data $output] {