mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 17:30:35 +05:00
Fix some compilation warnings
This commit is contained in:
parent
45a00be884
commit
04056cdd32
@ -124,7 +124,7 @@ void VolumeSection::CenterOfGravity()
|
||||
Standard_Real VolumeSection::CalculateVolume(Standard_Real Elevation)
|
||||
{
|
||||
Standard_Integer i,noeud[3],flag[3];
|
||||
Standard_Integer nbNodes;
|
||||
//Standard_Integer nbNodes;
|
||||
TopExp_Explorer ex;
|
||||
TopLoc_Location L;
|
||||
Standard_Real z[3];
|
||||
@ -144,7 +144,7 @@ Standard_Real VolumeSection::CalculateVolume(Standard_Real Elevation)
|
||||
MESSAGE("Error, null layer" )
|
||||
const Poly_Array1OfTriangle& triangles = Tr->Triangles();
|
||||
Standard_Integer nbTriangles = Tr->NbTriangles();
|
||||
nbNodes = Tr->NbNodes();
|
||||
//nbNodes = Tr->NbNodes();
|
||||
const TColgp_Array1OfPnt& Nodes = Tr->Nodes();
|
||||
|
||||
// Calcul des volumes de chaque triangle, de chaque face
|
||||
|
@ -258,8 +258,8 @@ TopoDS_Shape GEOM_Client::GetShape( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Object_p
|
||||
BRep_Builder B;
|
||||
TopoDS_Compound aCompound;
|
||||
B.MakeCompound(aCompound);
|
||||
for (int i = 0; i < list->length(); i++) {
|
||||
if (0 < list[i] && list[i] <= _mySubShapes[mainIOR].size()) {
|
||||
for (size_t i = 0; i < list->length(); i++) {
|
||||
if (0 < list[i] && list[i] <= (CORBA::Long)_mySubShapes[mainIOR].size()) {
|
||||
TopoDS_Shape aSubShape = _mySubShapes[mainIOR][list[i]-1];
|
||||
B.Add(aCompound, aSubShape);
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ namespace
|
||||
levelsListStr.push_back( substr );
|
||||
}
|
||||
GEOMUtils::LevelsList levelsListData;
|
||||
for( int level = 0; level < levelsListStr.size(); level++ ) {
|
||||
for( size_t level = 0; level < levelsListStr.size(); level++ ) {
|
||||
std::vector<std::string> namesListStr;
|
||||
std::stringstream ss1( levelsListStr[level] );
|
||||
while ( std::getline( ss1, substr, ',' ) ) {
|
||||
@ -270,7 +270,7 @@ namespace
|
||||
namesListStr.push_back( substr );
|
||||
}
|
||||
GEOMUtils::LevelInfo levelInfoData;
|
||||
for( int node = 0; node < namesListStr.size(); node++ ) {
|
||||
for( size_t node = 0; node < namesListStr.size(); node++ ) {
|
||||
std::vector<std::string> linksListStr;
|
||||
std::stringstream ss2( namesListStr[node] );
|
||||
while ( std::getline( ss2, substr, '_' ) ) {
|
||||
@ -280,7 +280,7 @@ namespace
|
||||
std::string nodeItem = linksListStr[0];
|
||||
if( !nodeItem.empty() ) {
|
||||
GEOMUtils::NodeLinks linksListData;
|
||||
for( int link = 1; link < linksListStr.size(); link++ ) {
|
||||
for( size_t link = 1; link < linksListStr.size(); link++ ) {
|
||||
std::string linkItem = linksListStr[link];
|
||||
linksListData.push_back( linkItem );
|
||||
}// Links
|
||||
@ -1083,7 +1083,7 @@ void GEOMUtils::ConvertStringToTree( const std::string& dependencyStr,
|
||||
cursor = objectIndex;
|
||||
|
||||
std::size_t upwardIndexBegin = dependencyStr.find("{",cursor) + 1;
|
||||
std::size_t upwardIndexFinish = dependencyStr.find("}",upwardIndexBegin);
|
||||
//std::size_t upwardIndexFinish = dependencyStr.find("}",upwardIndexBegin);
|
||||
LevelsList upwardList = parseWard( dependencyStr, cursor );
|
||||
|
||||
LevelsList downwardList = parseWard( dependencyStr, cursor );
|
||||
|
@ -137,7 +137,7 @@ Distribution ComputeDistribution( std::list<TopoDS_Shape> shapes,
|
||||
}
|
||||
}
|
||||
aDistr.push_back( localRange );
|
||||
for( int j=0; j < indicesToErase.size(); j++ )
|
||||
for( size_t j=0; j < indicesToErase.size(); j++ )
|
||||
measures.erase( indicesToErase[j] );
|
||||
}
|
||||
|
||||
|
@ -137,6 +137,7 @@ namespace
|
||||
return xmlPaths;
|
||||
}
|
||||
|
||||
#ifdef MYDEBUG
|
||||
void dumpinfo(const GEOMUtils::PluginInfo& info)
|
||||
{
|
||||
printf("DUMPING PLUGIN INFO\n");
|
||||
@ -160,6 +161,7 @@ namespace
|
||||
printf("-----\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace GEOMUtils
|
||||
|
@ -3919,8 +3919,8 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
|
||||
# publication is switched on, default value is used for result name.
|
||||
#
|
||||
# @return New GEOM.GEOM_Object, containing the created pipe if
|
||||
# \a IsGenerateGroups is not set. Otherwise it returns new
|
||||
# GEOM.ListOfGO. Its first element is the created pipe, the
|
||||
# \a IsGenerateGroups is not set. Otherwise it returns a
|
||||
# list of GEOM.GEOM_Object. Its first element is the created pipe, the
|
||||
# remaining ones are created groups.
|
||||
#
|
||||
# @ref tui_creation_pipe "Example"
|
||||
@ -3959,8 +3959,8 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
|
||||
|
||||
Returns:
|
||||
New GEOM.GEOM_Object, containing the created pipe if
|
||||
IsGenerateGroups is not set. Otherwise it returns new
|
||||
GEOM.ListOfGO. Its first element is the created pipe, the
|
||||
IsGenerateGroups is not set. Otherwise it returns a
|
||||
list of GEOM.GEOM_Object. Its first element is the created pipe, the
|
||||
remaining ones are created groups.
|
||||
"""
|
||||
# Example: see GEOM_TestAll.py
|
||||
|
@ -707,10 +707,14 @@ Standard_Boolean GEOM_AISShape::computeMassCenter( const TopoDS_Shape& theShape,
|
||||
C += ( uv1.XY() + uv2.XY() + uv3.XY() ) / 3. * a;
|
||||
A += a;
|
||||
}
|
||||
if ( A > std::numeric_limits<double>::min() )
|
||||
{
|
||||
C /= A;
|
||||
theCenter = surface.Value( C.X(), C.Y() );
|
||||
aNbPoints = 1;
|
||||
}
|
||||
else
|
||||
}
|
||||
if ( aNbPoints == 0 )
|
||||
{
|
||||
theCenter = surface.Value( 0.5 * ( surface.FirstUParameter() + surface.LastUParameter() ),
|
||||
0.5 * ( surface.FirstVParameter() + surface.LastVParameter() ));
|
||||
|
@ -369,7 +369,7 @@ private:
|
||||
\brief Constructor
|
||||
\internal
|
||||
*/
|
||||
Sketcher_Profile::Functor::Functor() : myError( 0 ), myNumberOfCommand( 0 ), myOk( true )
|
||||
Sketcher_Profile::Functor::Functor() : myNumberOfCommand( 0 ), myError( 0 ), myOk( true )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -287,11 +287,11 @@ Handle(Geom_Surface) ShHealOper_FillHoles::buildSurface(const TopoDS_Wire& theWi
|
||||
TopoDS_Edge ae = TopoDS::Edge(aIter.Value());
|
||||
BRepAdaptor_Curve adC(ae);
|
||||
Handle(BRepAdaptor_HCurve) aHAD= new BRepAdaptor_HCurve(adC);
|
||||
Handle(BRepFill_CurveConstraint) aConst =
|
||||
new BRepFill_CurveConstraint (Handle(Adaptor3d_HCurve)::DownCast(aHAD), (Standard_Integer) GeomAbs_C0, myNbPtsOnCur, myTol3d);
|
||||
//Handle(GeomPlate_CurveConstraint) aConst =
|
||||
// new GeomPlate_CurveConstraint(aHAD, (Standard_Integer) GeomAbs_C0, myNbPtsOnCur, myTol3d);
|
||||
aBuilder.Add (Handle(GeomPlate_CurveConstraint)::DownCast(aConst));
|
||||
// Handle(BRepFill_CurveConstraint) aConst =
|
||||
// new BRepFill_CurveConstraint (Handle(Adaptor3d_HCurve)::DownCast(aHAD), (Standard_Integer) GeomAbs_C0, myNbPtsOnCur, myTol3d);
|
||||
Handle(GeomPlate_CurveConstraint) aConst =
|
||||
new GeomPlate_CurveConstraint(aHAD, (Standard_Integer) GeomAbs_C0, myNbPtsOnCur, myTol3d);
|
||||
aBuilder.Add (aConst);
|
||||
}
|
||||
aBuilder.Perform();
|
||||
if(!aBuilder.IsDone())
|
||||
|
@ -35,11 +35,10 @@ using namespace XAO;
|
||||
|
||||
Field::Field(const XAO::Dimension& dimension,
|
||||
const int& nbElements, const int& nbComponents, const std::string& name)
|
||||
: m_name(name), m_dimension(dimension), m_nbElements(nbElements), m_nbComponents(nbComponents)
|
||||
: m_name(name), m_dimension(dimension),
|
||||
m_nbComponents(nbComponents), m_components(nbComponents, ""),
|
||||
m_nbElements(nbElements)
|
||||
{
|
||||
m_components.reserve(nbComponents);
|
||||
for (int i = 0; i < nbComponents; ++i)
|
||||
m_components.push_back("");
|
||||
}
|
||||
|
||||
Field::~Field()
|
||||
@ -83,7 +82,7 @@ throw (XAO_Exception)
|
||||
{
|
||||
for (unsigned int i = 0; i < names.size(); ++i)
|
||||
{
|
||||
if (i < m_nbComponents)
|
||||
if ((int)i < m_nbComponents)
|
||||
m_components[i] = names[i];
|
||||
}
|
||||
}
|
||||
@ -130,7 +129,7 @@ throw (XAO_Exception)
|
||||
void Field::checkStepIndex(const int& step)
|
||||
throw (XAO_Exception)
|
||||
{
|
||||
if (step < m_steps.size() && step >= 0)
|
||||
if (step < (int)m_steps.size() && step >= 0)
|
||||
return;
|
||||
|
||||
throw XAO_Exception(MsgBuilder() << "Step index is out of range [0, "
|
||||
|
@ -43,7 +43,7 @@ Group::~Group()
|
||||
void Group::checkIndex(const int& element)
|
||||
throw (XAO_Exception)
|
||||
{
|
||||
if (element < m_elements.size() && element >= 0)
|
||||
if (element < (int)m_elements.size() && element >= 0)
|
||||
return;
|
||||
|
||||
throw XAO_Exception(MsgBuilder() << "Index of element is out of range [0, "
|
||||
|
Loading…
Reference in New Issue
Block a user