mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0023934: Compiler warnings in MS VC++ 10
Elimination of compiler warnings - ExprIntrp: generated file ExprIntrp.tab.c and related WOK scripts removed from the sources - ExprIntrp, StepFile: added missing declarations and casts; warnings caused by Flex and Bison code suppressed for MSVC compuler by #pragma - OSD: dummy #includes added to files containing no code for Windows, to avoid warning on empty file - PLib: piece of code contained in PLib_ChangeDim.gxx included explicitly in cxx and cleaned - Other places: some casts added to avoid warnings
This commit is contained in:
@@ -1,3 +1,2 @@
|
||||
PLib_ChangeDim.gxx
|
||||
PLib_JacobiPolynomial_0.hxx
|
||||
PLib_CMPLRS.edl
|
||||
|
@@ -29,31 +29,185 @@
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
|
||||
#include <math_Gauss.hxx>
|
||||
#include <math.hxx>
|
||||
|
||||
// To convert points array into Real ..
|
||||
// *********************************
|
||||
|
||||
#define Dimension_gen 2
|
||||
#define Array1OfPoints TColgp_Array1OfPnt2d
|
||||
#define Point gp_Pnt2d
|
||||
//=======================================================================
|
||||
//function : SetPoles
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
#include <PLib_ChangeDim.gxx>
|
||||
void PLib::SetPoles(const TColgp_Array1OfPnt2d& Poles,
|
||||
TColStd_Array1OfReal& FP)
|
||||
{
|
||||
Standard_Integer j = FP .Lower();
|
||||
Standard_Integer PLower = Poles.Lower();
|
||||
Standard_Integer PUpper = Poles.Upper();
|
||||
|
||||
for (Standard_Integer i = PLower; i <= PUpper; i++) {
|
||||
const gp_Pnt2d& P = Poles(i);
|
||||
FP(j) = P.Coord(1); j++;
|
||||
FP(j) = P.Coord(2); j++;
|
||||
}
|
||||
}
|
||||
|
||||
#undef Dimension_gen
|
||||
#undef Array1OfPoints
|
||||
#undef Point
|
||||
//=======================================================================
|
||||
//function : SetPoles
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
#define Dimension_gen 3
|
||||
#define Array1OfPoints TColgp_Array1OfPnt
|
||||
#define Point gp_Pnt
|
||||
void PLib::SetPoles(const TColgp_Array1OfPnt2d& Poles,
|
||||
const TColStd_Array1OfReal& Weights,
|
||||
TColStd_Array1OfReal& FP)
|
||||
{
|
||||
Standard_Integer j = FP .Lower();
|
||||
Standard_Integer PLower = Poles.Lower();
|
||||
Standard_Integer PUpper = Poles.Upper();
|
||||
|
||||
for (Standard_Integer i = PLower; i <= PUpper; i++) {
|
||||
Standard_Real w = Weights(i);
|
||||
const gp_Pnt2d& P = Poles(i);
|
||||
FP(j) = P.Coord(1) * w; j++;
|
||||
FP(j) = P.Coord(2) * w; j++;
|
||||
FP(j) = w; j++;
|
||||
}
|
||||
}
|
||||
|
||||
#include <PLib_ChangeDim.gxx>
|
||||
//=======================================================================
|
||||
//function : GetPoles
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
#undef Dimension_gen
|
||||
#undef Array1OfPoints
|
||||
#undef Point
|
||||
void PLib::GetPoles(const TColStd_Array1OfReal& FP,
|
||||
TColgp_Array1OfPnt2d& Poles)
|
||||
{
|
||||
Standard_Integer j = FP .Lower();
|
||||
Standard_Integer PLower = Poles.Lower();
|
||||
Standard_Integer PUpper = Poles.Upper();
|
||||
|
||||
for (Standard_Integer i = PLower; i <= PUpper; i++) {
|
||||
gp_Pnt2d& P = Poles(i);
|
||||
P.SetCoord(1,FP(j)); j++;
|
||||
P.SetCoord(2,FP(j)); j++;
|
||||
}
|
||||
}
|
||||
|
||||
#include <math_Gauss.hxx>
|
||||
#include <math.hxx>
|
||||
//=======================================================================
|
||||
//function : GetPoles
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void PLib::GetPoles(const TColStd_Array1OfReal& FP,
|
||||
TColgp_Array1OfPnt2d& Poles,
|
||||
TColStd_Array1OfReal& Weights)
|
||||
{
|
||||
Standard_Integer j = FP .Lower();
|
||||
Standard_Integer PLower = Poles.Lower();
|
||||
Standard_Integer PUpper = Poles.Upper();
|
||||
|
||||
for (Standard_Integer i = PLower; i <= PUpper; i++) {
|
||||
Standard_Real w = FP(j + 2);
|
||||
Weights(i) = w;
|
||||
gp_Pnt2d& P = Poles(i);
|
||||
P.SetCoord(1,FP(j) / w); j++;
|
||||
P.SetCoord(2,FP(j) / w); j++;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetPoles
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void PLib::SetPoles(const TColgp_Array1OfPnt& Poles,
|
||||
TColStd_Array1OfReal& FP)
|
||||
{
|
||||
Standard_Integer j = FP .Lower();
|
||||
Standard_Integer PLower = Poles.Lower();
|
||||
Standard_Integer PUpper = Poles.Upper();
|
||||
|
||||
for (Standard_Integer i = PLower; i <= PUpper; i++) {
|
||||
const gp_Pnt& P = Poles(i);
|
||||
FP(j) = P.Coord(1); j++;
|
||||
FP(j) = P.Coord(2); j++;
|
||||
FP(j) = P.Coord(3); j++;
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetPoles
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void PLib::SetPoles(const TColgp_Array1OfPnt& Poles,
|
||||
const TColStd_Array1OfReal& Weights,
|
||||
TColStd_Array1OfReal& FP)
|
||||
{
|
||||
Standard_Integer j = FP .Lower();
|
||||
Standard_Integer PLower = Poles.Lower();
|
||||
Standard_Integer PUpper = Poles.Upper();
|
||||
|
||||
for (Standard_Integer i = PLower; i <= PUpper; i++) {
|
||||
Standard_Real w = Weights(i);
|
||||
const gp_Pnt& P = Poles(i);
|
||||
FP(j) = P.Coord(1) * w; j++;
|
||||
FP(j) = P.Coord(2) * w; j++;
|
||||
FP(j) = P.Coord(3) * w; j++;
|
||||
FP(j) = w; j++;
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetPoles
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void PLib::GetPoles(const TColStd_Array1OfReal& FP,
|
||||
TColgp_Array1OfPnt& Poles)
|
||||
{
|
||||
Standard_Integer j = FP .Lower();
|
||||
Standard_Integer PLower = Poles.Lower();
|
||||
Standard_Integer PUpper = Poles.Upper();
|
||||
|
||||
for (Standard_Integer i = PLower; i <= PUpper; i++) {
|
||||
gp_Pnt& P = Poles(i);
|
||||
P.SetCoord(1,FP(j)); j++;
|
||||
P.SetCoord(2,FP(j)); j++;
|
||||
P.SetCoord(3,FP(j)); j++;
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetPoles
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void PLib::GetPoles(const TColStd_Array1OfReal& FP,
|
||||
TColgp_Array1OfPnt& Poles,
|
||||
TColStd_Array1OfReal& Weights)
|
||||
{
|
||||
Standard_Integer j = FP .Lower();
|
||||
Standard_Integer PLower = Poles.Lower();
|
||||
Standard_Integer PUpper = Poles.Upper();
|
||||
|
||||
for (Standard_Integer i = PLower; i <= PUpper; i++) {
|
||||
Standard_Real w = FP(j + 3);
|
||||
Weights(i) = w;
|
||||
gp_Pnt& P = Poles(i);
|
||||
P.SetCoord(1,FP(j) / w); j++;
|
||||
P.SetCoord(2,FP(j) / w); j++;
|
||||
P.SetCoord(3,FP(j) / w); j++;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
// specialized allocator
|
||||
namespace
|
||||
{
|
||||
|
||||
class BinomAllocator
|
||||
{
|
||||
@@ -120,8 +274,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
namespace
|
||||
{
|
||||
// we do not call BSplCLib here to avoid Cyclic dependency detection by WOK
|
||||
//static BinomAllocator THE_BINOM (BSplCLib::MaxDegree() + 1);
|
||||
static BinomAllocator THE_BINOM (25 + 1);
|
||||
|
@@ -1,160 +0,0 @@
|
||||
// Created on: 1995-09-01
|
||||
// Created by: Laurent BOURESCHE
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
//
|
||||
// The content of this file is subject to the Open CASCADE Technology Public
|
||||
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||
// except in compliance with the License. Please obtain a copy of the License
|
||||
// at http://www.opencascade.org and read it completely before using this file.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
//
|
||||
// The Original Code and all software distributed under the License is
|
||||
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
// Initial Developer hereby disclaims all such warranties, including without
|
||||
// limitation, any warranties of merchantability, fitness for a particular
|
||||
// purpose or non-infringement. Please see the License for the specific terms
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
#define No_Standard_RangeError
|
||||
#define No_Standard_OutOfRange
|
||||
|
||||
//=======================================================================
|
||||
//function : SetPoles
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void PLib::SetPoles(const Array1OfPoints& Poles,
|
||||
TColStd_Array1OfReal& FP)
|
||||
{
|
||||
Standard_Integer i;
|
||||
Standard_Integer j = FP .Lower();
|
||||
Standard_Integer PLower = Poles.Lower();
|
||||
Standard_Integer PUpper = Poles.Upper();
|
||||
if (Dimension_gen == 3) {
|
||||
|
||||
for (i = PLower; i <= PUpper; i++) {
|
||||
const Point& P = Poles(i);
|
||||
FP(j) = P.Coord(1); j++;
|
||||
FP(j) = P.Coord(2); j++;
|
||||
FP(j) = P.Coord(3); j++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
for (i = PLower; i <= PUpper; i++) {
|
||||
const Point& P = Poles(i);
|
||||
FP(j) = P.Coord(1); j++;
|
||||
FP(j) = P.Coord(2); j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetPoles
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void PLib::SetPoles(const Array1OfPoints& Poles,
|
||||
const TColStd_Array1OfReal& Weights,
|
||||
TColStd_Array1OfReal& FP)
|
||||
{
|
||||
Standard_Real w;
|
||||
Standard_Integer i;
|
||||
Standard_Integer j = FP .Lower();
|
||||
Standard_Integer PLower = Poles.Lower();
|
||||
Standard_Integer PUpper = Poles.Upper();
|
||||
if (Dimension_gen == 3) {
|
||||
|
||||
for (i = PLower; i <= PUpper; i++) {
|
||||
w = Weights(i);
|
||||
const Point& P = Poles(i);
|
||||
FP(j) = P.Coord(1) * w; j++;
|
||||
FP(j) = P.Coord(2) * w; j++;
|
||||
FP(j) = P.Coord(3) * w; j++;
|
||||
FP(j) = w; j++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
for (i = PLower; i <= PUpper; i++) {
|
||||
w = Weights(i);
|
||||
const Point& P = Poles(i);
|
||||
FP(j) = P.Coord(1) * w; j++;
|
||||
FP(j) = P.Coord(2) * w; j++;
|
||||
FP(j) = w; j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetPoles
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void PLib::GetPoles(const TColStd_Array1OfReal& FP,
|
||||
Array1OfPoints& Poles)
|
||||
{
|
||||
Standard_Integer i;
|
||||
Standard_Integer j = FP .Lower();
|
||||
Standard_Integer PLower = Poles.Lower();
|
||||
Standard_Integer PUpper = Poles.Upper();
|
||||
if (Dimension_gen == 3) {
|
||||
|
||||
for (i = PLower; i <= PUpper; i++) {
|
||||
Point& P = Poles(i);
|
||||
P.SetCoord(1,FP(j)); j++;
|
||||
P.SetCoord(2,FP(j)); j++;
|
||||
P.SetCoord(3,FP(j)); j++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
for (i = PLower; i <= PUpper; i++) {
|
||||
Point& P = Poles(i);
|
||||
P.SetCoord(1,FP(j)); j++;
|
||||
P.SetCoord(2,FP(j)); j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetPoles
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void PLib::GetPoles(const TColStd_Array1OfReal& FP,
|
||||
Array1OfPoints& Poles,
|
||||
TColStd_Array1OfReal& Weights)
|
||||
{
|
||||
Standard_Real w;
|
||||
Standard_Integer i;
|
||||
Standard_Integer j = FP .Lower();
|
||||
Standard_Integer PLower = Poles.Lower();
|
||||
Standard_Integer PUpper = Poles.Upper();
|
||||
if (Dimension_gen == 3) {
|
||||
|
||||
for (i = PLower; i <= PUpper; i++) {
|
||||
Weights(i) = w = FP(j + 3);
|
||||
Point& P = Poles(i);
|
||||
P.SetCoord(1,FP(j) / w); j++;
|
||||
P.SetCoord(2,FP(j) / w); j++;
|
||||
P.SetCoord(3,FP(j) / w); j++;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
for (i = PLower; i <= PUpper; i++) {
|
||||
Weights(i) = w = FP(j + 2);
|
||||
Point& P = Poles(i);
|
||||
P.SetCoord(1,FP(j) / w); j++;
|
||||
P.SetCoord(2,FP(j) / w); j++;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user