//---------------------------------------------------------------
- struct TSubProfileLess
- {
- bool
- operator()(const PSubProfile& theLeft, const PSubProfile& theRight) const;
- };
+ bool
+ operator<(const PSubProfile& theLeft, const PSubProfile& theRight);
- typedef std::set<PSubProfile,TSubProfileLess> TProfileKey;
+ typedef std::set<PSubProfile> TProfileKey;
typedef std::map<TProfileKey,PProfile> TProfileMap;
//---------------------------------------------------------------
- struct TGaussSubMeshLess
- {
- bool
- operator()(const PGaussSubMesh& theLeft, const PGaussSubMesh& theRight) const;
- };
+ bool
+ operator<(const PGaussSubMesh& theLeft, const PGaussSubMesh& theRight);
- typedef std::set<PGaussSubMesh,TGaussSubMeshLess> TGaussKey;
+ typedef std::set<PGaussSubMesh> TGaussKey;
typedef std::map<TGaussKey,PGaussMesh> TGaussMeshMap;
//---------------------------------------------------------------
bool
- TSubProfileLess
- ::operator()(const PSubProfile& theLeft, const PSubProfile& theRight) const
+ operator<(const PSubProfile& theLeft, const PSubProfile& theRight)
{
PSubProfileImpl aLeft(theLeft), aRight(theRight);
+
if(aLeft->myGeom != aRight->myGeom)
return aLeft->myGeom < aRight->myGeom;
+
return aLeft->myName < aRight->myName;
}
//---------------------------------------------------------------
bool
- TGaussSubMeshLess::
- operator()(const PGaussSubMesh& theLeft, const PGaussSubMesh& theRight) const
+ operator<(const PGaussSubMesh& theLeft, const PGaussSubMesh& theRight)
{
PGaussImpl aLeft(theLeft->myGauss), aRight(theRight->myGauss);
if(aLeft->myName != aRight->myName)
return aLeft->myName < aRight->myName;
- return TSubProfileLess()(theLeft->mySubProfile,theRight->mySubProfile);
+ return theLeft->mySubProfile < theRight->mySubProfile;
}