mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-10 09:30:48 +08:00
Configuration - Update compiler flags and includes for macOS (#884)
- Added flags to suppress elaborated-enum-base warnings for newer Clang versions on macOS - Updated includes in TDF_AttributeMap.hxx to include Standard_Handle.hxx - Modified hash functions in GeomHash and Geom2dHash classes to use Standard_CStringHasher instead of Standard_HashUtils
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#ifndef TDF_AttributeMap_HeaderFile
|
||||
#define TDF_AttributeMap_HeaderFile
|
||||
|
||||
#include <Standard_Handle.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
#include <NCollection_Map.hxx>
|
||||
|
||||
|
||||
@@ -23,14 +23,16 @@
|
||||
#include <TDF_TagSource.hxx>
|
||||
#include <TDF_Data.hxx>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace std
|
||||
{
|
||||
template <>
|
||||
struct hash<TDF_Label>
|
||||
{
|
||||
size_t operator()(const TDF_Label& theNode) const
|
||||
size_t operator()(const TDF_Label& theLabel) const noexcept
|
||||
{
|
||||
return std::hash<TDF_LabelNodePtr>{}(theNode.myLabelNode);
|
||||
return static_cast<size_t>(reinterpret_cast<std::uintptr_t>(theLabel.myLabelNode));
|
||||
}
|
||||
};
|
||||
} // namespace std
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <Geom2dHash_CurveHasher.hxx>
|
||||
|
||||
#include <Standard_HashUtils.hxx>
|
||||
#include <Standard_CStringHasher.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <Geom2d_Circle.hxx>
|
||||
@@ -83,7 +83,7 @@ std::size_t Geom2dHash_CurveHasher::operator()(const Handle(Geom2d_Curve)& theCu
|
||||
}
|
||||
|
||||
// Unknown curve type - hash the type name
|
||||
return std::hash<std::string>{}(theCurve->DynamicType()->Name());
|
||||
return Standard_CStringHasher{}(theCurve->DynamicType()->Name());
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <GeomHash_CurveHasher.hxx>
|
||||
|
||||
#include <Standard_HashUtils.hxx>
|
||||
#include <Standard_CStringHasher.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_Line.hxx>
|
||||
#include <Geom_Circle.hxx>
|
||||
@@ -83,7 +83,7 @@ std::size_t GeomHash_CurveHasher::operator()(const Handle(Geom_Curve)& theCurve)
|
||||
}
|
||||
|
||||
// Unknown curve type - hash the type name
|
||||
return std::hash<std::string>{}(theCurve->DynamicType()->Name());
|
||||
return Standard_CStringHasher{}(theCurve->DynamicType()->Name());
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <GeomHash_SurfaceHasher.hxx>
|
||||
|
||||
#include <Standard_HashUtils.hxx>
|
||||
#include <Standard_CStringHasher.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Geom_Plane.hxx>
|
||||
#include <Geom_CylindricalSurface.hxx>
|
||||
@@ -100,7 +100,7 @@ std::size_t GeomHash_SurfaceHasher::operator()(
|
||||
}
|
||||
|
||||
// Unknown surface type - hash the type name
|
||||
return std::hash<std::string>{}(theSurface->DynamicType()->Name());
|
||||
return Standard_CStringHasher{}(theSurface->DynamicType()->Name());
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
Reference in New Issue
Block a user