0030550: Coding - Integer overflow in Standard_CString HashCodes
[occt.git] / src / TopTools / TopTools_OrientedShapeMapHasher.hxx
index 1d2c5ce..d4e105e 100644 (file)
@@ -33,11 +33,12 @@ public:
 
   DEFINE_STANDARD_ALLOC
 
-  
-  //! Returns a HasCode value  for  the  Key <K>  in the
-  //! range 0..Upper.
-    static Standard_Integer HashCode (const TopoDS_Shape& S, const Standard_Integer Upper);
-  
+  //! Computes a hash code for the given shape, in the range [1, theUpperBound]
+  //! @param theShape the shape which hash code is to be computed
+  //! @param theUpperBound the upper bound of the range a computing hash code must be within
+  //! @return a computed hash code, in the range [1, theUpperBound]
+  static Standard_Integer HashCode (const TopoDS_Shape& theShape, const Standard_Integer theUpperBound);
+
   //! Returns True when the two keys are equal. Two same
   //! keys must have the same hashcode,  the contrary is
   //! not necessary.