mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-07-30 13:05:50 +03:00
0027105: Make code ISO-compliant [-Wpedantic fixes]
Remove extra semicolons and correct function prototypes for GCC -pedantic ISO compliance option
This commit is contained in:
parent
d3b7582d2f
commit
a3f6f591fc
@ -61,7 +61,7 @@ namespace
|
||||
static const Standard_Real THE_EMPTY_LABEL_WIDTH = 0.0;
|
||||
static const Standard_ExtCharacter THE_DEGREE_SYMBOL (0x00B0);
|
||||
static const Standard_Real THE_3D_TEXT_MARGIN = 0.1;
|
||||
};
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Constructor
|
||||
|
@ -54,7 +54,7 @@ public: //! @name list of overridden properties
|
||||
Standard_Boolean myHasOwnWidth;
|
||||
|
||||
public:
|
||||
DEFINE_STANDARD_RTTIEXT(AIS_ColoredDrawer,Prs3d_Drawer);
|
||||
DEFINE_STANDARD_RTTIEXT(AIS_ColoredDrawer,Prs3d_Drawer)
|
||||
|
||||
};
|
||||
|
||||
@ -175,7 +175,7 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(AIS_ColoredShape,AIS_Shape);
|
||||
DEFINE_STANDARD_RTTIEXT(AIS_ColoredShape,AIS_Shape)
|
||||
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@ IMPLEMENT_STANDARD_RTTIEXT(AIS_DiameterDimension,AIS_Dimension)
|
||||
namespace
|
||||
{
|
||||
static const Standard_ExtCharacter THE_DIAMETER_SYMBOL (0x00D8);
|
||||
};
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Constructor
|
||||
|
@ -90,7 +90,7 @@ namespace
|
||||
// default selection priorities
|
||||
static const Standard_Integer THE_NEUTRAL_SEL_PRIORITY = 5;
|
||||
static const Standard_Integer THE_LOCAL_SEL_PRIORITY = 6;
|
||||
};
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Constructor
|
||||
|
@ -42,7 +42,7 @@ namespace
|
||||
return AIS_Dimension::ComputeMode_All;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Constructor
|
||||
|
@ -27,7 +27,7 @@ IMPLEMENT_STANDARD_RTTIEXT(AIS_RadiusDimension,AIS_Dimension)
|
||||
namespace
|
||||
{
|
||||
static const Standard_ExtCharacter THE_RADIUS_SYMBOL ('R');
|
||||
};
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Constructor
|
||||
|
@ -115,7 +115,7 @@ protected:
|
||||
public:
|
||||
|
||||
//! CASCADE RTTI
|
||||
DEFINE_STANDARD_RTTIEXT(AIS_TextLabel,AIS_InteractiveObject);
|
||||
DEFINE_STANDARD_RTTIEXT(AIS_TextLabel,AIS_InteractiveObject)
|
||||
|
||||
};
|
||||
|
||||
|
@ -81,6 +81,6 @@ namespace Aspect_Convert
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* _Aspect_Convert_HeaderFile */
|
||||
|
@ -33,7 +33,7 @@ Aspect_GradientBackground::Aspect_GradientBackground( const Quantity_Color& ACol
|
||||
SetColor( AColor1 );
|
||||
MyColor2 = AColor2;
|
||||
MyGradientMethod = AMethod;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
void Aspect_GradientBackground::SetColors( const Quantity_Color& AColor1,
|
||||
|
@ -358,7 +358,7 @@ void BOPAlgo_FillIn3DParts::Perform()
|
||||
}
|
||||
}
|
||||
} // for (k=0; k<aNbFP; ++k) {
|
||||
};
|
||||
}
|
||||
//=======================================================================
|
||||
// function: MapEdgesAndFaces
|
||||
// purpose:
|
||||
|
@ -39,7 +39,7 @@ IMPLEMENT_STANDARD_RTTIEXT(BRepCheck_Solid,BRepCheck_Result)
|
||||
|
||||
//
|
||||
class BRepCheck_HSC;
|
||||
DEFINE_STANDARD_HANDLE(BRepCheck_HSC, MMgt_TShared);
|
||||
DEFINE_STANDARD_HANDLE(BRepCheck_HSC, MMgt_TShared)
|
||||
//=======================================================================
|
||||
//class : BRepCheck_HSC
|
||||
//purpose :
|
||||
|
@ -132,6 +132,6 @@ namespace BRepMesh
|
||||
//! Other data structures
|
||||
typedef std::pair<HArray1OfSegments, HBndBox2dTree> SegmentsTree;
|
||||
typedef NCollection_Array1<SegmentsTree> Array1OfSegmentsTree;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -45,7 +45,7 @@ namespace
|
||||
theLibName += ".so";
|
||||
#endif
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : BRepMesh_DiscretFactory
|
||||
|
@ -60,7 +60,7 @@ namespace
|
||||
//! Default flag to control parallelization for BRepMesh_IncrementalMesh
|
||||
//! tool returned for Mesh Factory
|
||||
static Standard_Boolean IS_IN_PARALLEL = Standard_False;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
|
@ -108,7 +108,7 @@ namespace {
|
||||
tmp_file->Remove();
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
// MKV 29.03.05
|
||||
#if ((TCL_MAJOR_VERSION > 8) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4))) && !defined(USE_NON_CONST)
|
||||
|
@ -89,7 +89,7 @@ public:
|
||||
//! isSenseMarker indicates whether to render the
|
||||
//! sense glyph (arrow) for curves or not
|
||||
Standard_EXPORT static void Set (const Standard_CString Name, const Handle(Geom_Geometry)& G, const Standard_Boolean isSenseMarker = Standard_True);
|
||||
template <class T> static void Set (const Standard_CString Name, const Handle(T)& Arg, typename std::enable_if<std::is_base_of<Geom_Geometry, T>::value>::type * = 0) { Set (Name, (const Handle(Geom_Geometry)&)Arg); };
|
||||
template <class T> static void Set (const Standard_CString Name, const Handle(T)& Arg, typename std::enable_if<std::is_base_of<Geom_Geometry, T>::value>::type * = 0) { Set (Name, (const Handle(Geom_Geometry)&)Arg); }
|
||||
|
||||
//! Sets <C> in the variable <Name>. Overwrite the
|
||||
//! variable if already set.
|
||||
|
@ -62,7 +62,7 @@ namespace
|
||||
return theSize / Standard_Real(THE_FONT_SIZE) * 72.0 / Standard_Real(THE_RESOLUTION_DPI);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : Constructor
|
||||
|
@ -173,7 +173,7 @@ static const Font_FontMgr_FontAliasMapNode Font_FontMgr_MapOfFontsAliases[] =
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <math_Vector.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
|
||||
GProp_SelGProps::GProp_SelGProps(){};
|
||||
GProp_SelGProps::GProp_SelGProps(){}
|
||||
|
||||
void GProp_SelGProps::SetLocation(const gp_Pnt& SLocation )
|
||||
{
|
||||
|
@ -631,18 +631,18 @@ Standard_Real GeomFill_CorrectedFrenet::CalcAngleAT(const gp_Vec& Tangent, const
|
||||
if (Normal_rot.Crossed(prevNormal).IsOpposite(prevTangent, Precision::Angular()))
|
||||
angleAT = -angleAT;
|
||||
return angleAT;
|
||||
};
|
||||
}
|
||||
//===============================================================
|
||||
// Function : ... (OCC78)
|
||||
// Purpose : This family of functions produce conversion of angle utility
|
||||
//===============================================================
|
||||
static Standard_Real corr2PI_PI(Standard_Real Ang){
|
||||
return Ang = (Ang < M_PI? Ang: Ang-2*M_PI);
|
||||
};
|
||||
}
|
||||
static Standard_Real diffAng(Standard_Real A, Standard_Real Ao){
|
||||
Standard_Real dA = (A-Ao) - Floor((A-Ao)/2.0/M_PI)*2.0*M_PI;
|
||||
return dA = dA >= 0? corr2PI_PI(dA): -corr2PI_PI(-dA);
|
||||
};
|
||||
}
|
||||
//===============================================================
|
||||
// Function : CalcAngleAT (OCC78)
|
||||
// Purpose : Calculate angle of rotation of trihedron normal and its derivatives relative
|
||||
@ -671,7 +671,7 @@ Standard_Real GeomFill_CorrectedFrenet::GetAngleAT(const Standard_Real Param) co
|
||||
AngP = AngPo + DAng;
|
||||
};
|
||||
return AngP;
|
||||
};
|
||||
}
|
||||
//===============================================================
|
||||
// Function : D0
|
||||
// Purpose :
|
||||
|
@ -20,7 +20,7 @@
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Boolean GeomLib_Interpolate::IsDone() const
|
||||
{ return myIsDone ; } ;
|
||||
{ return myIsDone ; }
|
||||
//=======================================================================
|
||||
//function : Error
|
||||
//purpose :
|
||||
|
@ -60,8 +60,8 @@ namespace
|
||||
Standard_Real aLogRadix = Log10 (anAbsValue) / Log10 (FLT_RADIX);
|
||||
Standard_Real aExp = Floor (aLogRadix);
|
||||
return FLT_EPSILON * Pow (FLT_RADIX, aExp);
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : Graphic3d_Camera
|
||||
|
@ -637,7 +637,7 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(Graphic3d_Camera,Standard_Transient);
|
||||
DEFINE_STANDARD_RTTIEXT(Graphic3d_Camera,Standard_Transient)
|
||||
};
|
||||
|
||||
DEFINE_STANDARD_HANDLE (Graphic3d_Camera, Standard_Transient)
|
||||
|
@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ClipPlane,Standard_Transient)
|
||||
namespace
|
||||
{
|
||||
static volatile Standard_Integer THE_CLIP_PLANE_COUNTER = 0;
|
||||
};
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : Graphic3d_ClipPlane
|
||||
|
@ -218,7 +218,7 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(Graphic3d_ClipPlane,Standard_Transient);
|
||||
DEFINE_STANDARD_RTTIEXT(Graphic3d_ClipPlane,Standard_Transient)
|
||||
};
|
||||
|
||||
DEFINE_STANDARD_HANDLE (Graphic3d_ClipPlane, Standard_Transient)
|
||||
|
@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_MarkerImage,Standard_Transient)
|
||||
namespace
|
||||
{
|
||||
static volatile Standard_Integer THE_MARKER_IMAGE_COUNTER = 0;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// =======================================================================
|
||||
|
@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ShaderObject,Standard_Transient)
|
||||
namespace
|
||||
{
|
||||
static volatile Standard_Integer THE_SHADER_OBJECT_COUNTER = 0;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// =======================================================================
|
||||
|
@ -29,7 +29,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ShaderProgram,Standard_Transient)
|
||||
namespace
|
||||
{
|
||||
static volatile Standard_Integer THE_PROGRAM_OBJECT_COUNTER = 0;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// =======================================================================
|
||||
|
@ -33,7 +33,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_TextureRoot,MMgt_TShared)
|
||||
namespace
|
||||
{
|
||||
static volatile Standard_Integer THE_TEXTURE_COUNTER = 0;
|
||||
};
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : TexturesFolder
|
||||
|
@ -126,7 +126,7 @@ namespace
|
||||
|| theFormat == Image_PixMap::ImgRGBA
|
||||
|| theFormat == Image_PixMap::ImgBGRA;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : Image_Diff
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <IntSurf_PntOn2S.hxx>
|
||||
|
||||
IntSurf_PntOn2S::IntSurf_PntOn2S () : pt(0,0,0),u1(0),v1(0),u2(0),v2(0) {};
|
||||
IntSurf_PntOn2S::IntSurf_PntOn2S () : pt(0,0,0),u1(0),v1(0),u2(0),v2(0) {}
|
||||
|
||||
void IntSurf_PntOn2S::SetValue (const gp_Pnt& Pt,
|
||||
const Standard_Boolean OnFirst,
|
||||
|
@ -207,7 +207,7 @@ namespace {
|
||||
{
|
||||
return theLeft.Root() < theRight.Root();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SortRoots
|
||||
|
@ -33,7 +33,7 @@
|
||||
namespace
|
||||
{
|
||||
static const Standard_Real PRCANG = Precision::Angular();
|
||||
};
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Intf_InterferencePolygon2d
|
||||
|
@ -173,7 +173,7 @@ Standard_EXPORT void StandardCallBack_Reset()
|
||||
namespace {
|
||||
// dummy function for break point
|
||||
inline void place_for_break_point () {}
|
||||
};
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : StandardCallBack
|
||||
|
@ -32,7 +32,11 @@ extern "C" {
|
||||
#define fstatvfs fstatfs
|
||||
#else
|
||||
#include <sys/statvfs.h>
|
||||
int statvfs(const char *, struct statvfs *);
|
||||
#ifdef __GNU_LIBRARY__
|
||||
int statvfs(const char *, struct statvfs *) __THROW;
|
||||
#else
|
||||
int statvfs(const char *, struct statvfs *);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -44,7 +44,7 @@ namespace {
|
||||
// otherwise compiler does not leave a place for break point
|
||||
debug_counter++;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetCallback
|
||||
|
@ -43,7 +43,11 @@ extern "C" {void *dlerror (void);}
|
||||
|
||||
#include <dlfcn.h>
|
||||
|
||||
extern "C" {size_t strlen (const char* s );}
|
||||
#ifdef __GNU_LIBRARY__
|
||||
extern "C" { size_t strlen(const char* s) __THROW; }
|
||||
#else
|
||||
extern "C" { size_t strlen(const char* s); }
|
||||
#endif
|
||||
|
||||
|
||||
#define BAD(X) ((X) == NULL)
|
||||
|
@ -48,7 +48,7 @@ namespace
|
||||
};
|
||||
|
||||
static const TCollection_AsciiString THE_EMPTY_KEY;
|
||||
};
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : convertMaterial
|
||||
|
@ -25,7 +25,7 @@ namespace
|
||||
{
|
||||
static const TEL_COLOUR myDefaultColor = {{ 1.0F, 1.0F, 1.0F, 1.0F }};
|
||||
static const TCollection_AsciiString THE_EMPTY_KEY;
|
||||
};
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : OpenGl_AspectLine
|
||||
|
@ -25,7 +25,7 @@ namespace
|
||||
{
|
||||
static const TEL_COLOUR TheDefaultColor = {{ 1.0F, 1.0F, 1.0F, 1.0F }};
|
||||
static const TCollection_AsciiString THE_EMPTY_KEY;
|
||||
};
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : OpenGl_AspectText
|
||||
|
@ -976,7 +976,7 @@ static void PushAspectMarker (const Handle(OpenGl_Context)& theCtx,
|
||||
5, aParams);
|
||||
}
|
||||
|
||||
}; // nameless namespace
|
||||
} // nameless namespace
|
||||
|
||||
// =======================================================================
|
||||
// function : PushMaterialState
|
||||
|
@ -136,7 +136,7 @@ namespace
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : OpenGl_Text
|
||||
|
@ -65,7 +65,7 @@ namespace
|
||||
{ 0.0F, 0.0F, 0.0F, 1.0F }}
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : Init
|
||||
|
@ -4647,7 +4647,7 @@ static Standard_Integer OCC26746(
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_STANDARD_HANDLE(QABugs_VertexFilter, SelectMgr_Filter);
|
||||
DEFINE_STANDARD_HANDLE(QABugs_VertexFilter, SelectMgr_Filter)
|
||||
class QABugs_VertexFilter: public SelectMgr_Filter
|
||||
{
|
||||
public:
|
||||
|
@ -192,7 +192,7 @@ namespace {
|
||||
// The better way is to pass this information via binder or via TopoDS_Shape itself, however,
|
||||
// this is very specific info to do so...
|
||||
Standard_Boolean NM_DETECTED = Standard_False;
|
||||
};
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Method : STEPControl_ActorRead::STEPControl_ActorRead ()
|
||||
|
@ -41,6 +41,6 @@ namespace SelectMgr_MatOp
|
||||
|
||||
return aRes;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // _SelectMgr_VectorTypes_HeaderFile
|
||||
|
@ -418,7 +418,7 @@ namespace
|
||||
aPrsGrp->SetGroupPrimitivesAspect (aBoundaryAspect);
|
||||
aPrsGrp->AddPrimitiveArray (aSegments);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : ExploreSolids
|
||||
|
@ -357,7 +357,7 @@ static Standard_Boolean FUN_findTOOF(const TopOpeBRepDS_PDataStructure pDS,
|
||||
return ok;
|
||||
}
|
||||
|
||||
Standard_EXPORT Standard_Boolean GLOBAL_btcx = Standard_False;void debtcx(){};
|
||||
Standard_EXPORT Standard_Boolean GLOBAL_btcx = Standard_False;void debtcx(){}
|
||||
Standard_EXPORT void debtcxmess(Standard_Integer f1,Standard_Integer f2,Standard_Integer il)
|
||||
{cout<<"f1,f2,il : "<<f1<<","<<f2<<","<<il<<endl;cout.flush();debtcx();}
|
||||
|
||||
|
@ -4391,7 +4391,7 @@ namespace
|
||||
}
|
||||
return Standard_False;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//===============================================================================================
|
||||
//function : VSetSelectionMode
|
||||
|
@ -6463,7 +6463,7 @@ public:
|
||||
const Standard_ShortReal theAngle);
|
||||
DEFINE_STANDARD_RTTI_INLINE(OCC_TextureEnv,Graphic3d_TextureEnv);
|
||||
};
|
||||
DEFINE_STANDARD_HANDLE(OCC_TextureEnv, Graphic3d_TextureEnv);
|
||||
DEFINE_STANDARD_HANDLE(OCC_TextureEnv, Graphic3d_TextureEnv)
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user