Add support for OCCT 7.8.0 (#11909)
This commit is contained in:
@@ -24,12 +24,13 @@
|
||||
#define IMPORT_TOOLS_H
|
||||
|
||||
#include <Quantity_ColorRGBA.hxx>
|
||||
#include <TDF_LabelMapHasher.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <XCAFDoc_ColorTool.hxx>
|
||||
#include <XCAFDoc_ShapeTool.hxx>
|
||||
#include <App/Color.h>
|
||||
|
||||
#include <Standard_Version.hxx>
|
||||
|
||||
namespace Import
|
||||
{
|
||||
|
||||
@@ -37,7 +38,11 @@ struct ShapeHasher
|
||||
{
|
||||
std::size_t operator()(const TopoDS_Shape& shape) const
|
||||
{
|
||||
#if OCC_VERSION_HEX >= 0x070800
|
||||
return std::hash<TopoDS_Shape> {}(shape);
|
||||
#else
|
||||
return shape.HashCode(INT_MAX);
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
@@ -45,7 +50,11 @@ struct LabelHasher
|
||||
{
|
||||
std::size_t operator()(const TDF_Label& label) const
|
||||
{
|
||||
#if OCC_VERSION_HEX >= 0x070800
|
||||
return std::hash<TDF_Label> {}(label);
|
||||
#else
|
||||
return TDF_LabelMapHasher::HashCode(label, INT_MAX);
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user