1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0026171: Coding rules - eliminate -Wshorten-64-to-32 CLang warnings

This commit is contained in:
rkv
2021-11-11 00:06:46 +03:00
committed by inv
parent 2b40ee81d1
commit 57c5e9e895
28 changed files with 189 additions and 246 deletions

View File

@@ -64,7 +64,6 @@ IntPatch_PrmPrmIntersection.hxx
IntPatch_PrmPrmIntersection.lxx
IntPatch_PrmPrmIntersection_T3Bits.cxx
IntPatch_PrmPrmIntersection_T3Bits.hxx
IntPatch_PrmPrmIntersection_T3Bits.lxx
IntPatch_RLine.cxx
IntPatch_RLine.hxx
IntPatch_RLine.lxx

View File

@@ -3308,7 +3308,7 @@ void IntPatch_PrmPrmIntersection::PointDepart(Handle(IntSurf_LineOn2S)& LineOn2S
for(si=-1; si<= 1 && nb<LIM; si++) {
for(sj=-1; sj<= 1 && nb<LIM; sj++) {
for(sk=-1; sk<= 1 && nb<LIM; sk++) {
long unsigned lu=GrilleInteger(i+si,j+sj,k+sk);
Standard_Integer lu = GrilleInteger(i+si,j+sj,k+sk);
if(M1.Val(lu) && M2.Val(lu)) {
nb++;
}
@@ -3320,7 +3320,7 @@ void IntPatch_PrmPrmIntersection::PointDepart(Handle(IntSurf_LineOn2S)& LineOn2S
for(sj=-1; sj<= 1; sj++) {
for(sk=-1; sk<= 1; sk++) {
if(si || sj || sk) {
long unsigned lu=GrilleInteger(i+si,j+sj,k+sk);
Standard_Integer lu = GrilleInteger(i+si,j+sj,k+sk);
M1.Raz(lu);
}
}

View File

@@ -14,7 +14,6 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <IntPatch_PrmPrmIntersection_T3Bits.hxx>
IntPatch_PrmPrmIntersection_T3Bits::IntPatch_PrmPrmIntersection_T3Bits(const Standard_Integer size)
@@ -23,12 +22,12 @@ IntPatch_PrmPrmIntersection_T3Bits::IntPatch_PrmPrmIntersection_T3Bits(const Sta
Standard_Integer nb = (size*size*size)>>5;
Isize = nb;
p = new Standard_Integer [nb];
do { ((Standard_Integer *) p)[--nb]=0; } while(nb);
do { p[--nb] = 0; } while(nb);
}
void IntPatch_PrmPrmIntersection_T3Bits::Destroy()
IntPatch_PrmPrmIntersection_T3Bits::~IntPatch_PrmPrmIntersection_T3Bits()
{
if(p) { delete[] ((Standard_Integer*)p); p=NULL; }
if (p) { delete[] p; p = NULL; }
}
void IntPatch_PrmPrmIntersection_T3Bits::ResetAnd()
@@ -42,10 +41,10 @@ Standard_Integer IntPatch_PrmPrmIntersection_T3Bits::And(IntPatch_PrmPrmIntersec
int k=indice>>5;
while(k<Isize)
{
Standard_Integer r=((Standard_Integer *) p)[k] & ((Standard_Integer *) Oth.p)[k];
Standard_Integer r = p[k] & Oth.p[k];
if(r)
{
unsigned long int c=0;
unsigned int c = 0;
do
{
if(r&1)

View File

@@ -24,57 +24,40 @@
#include <Standard_Address.hxx>
#include <Standard_Integer.hxx>
class IntPatch_PrmPrmIntersection_T3Bits
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT IntPatch_PrmPrmIntersection_T3Bits(const Standard_Integer size);
Standard_EXPORT void Destroy();
~IntPatch_PrmPrmIntersection_T3Bits()
{
Destroy();
}
void Add (const Standard_Integer t);
Standard_Integer Val (const Standard_Integer t) const;
void Raz (const Standard_Integer t);
Standard_EXPORT ~IntPatch_PrmPrmIntersection_T3Bits();
void Add (const Standard_Integer t)
{
p[t>>5] |= (1<<(((unsigned int)t)&31));
}
Standard_Integer Val (const Standard_Integer t) const
{
return (p[t>>5] & (1<<(((unsigned int)t)&31)));
}
void Raz (const Standard_Integer t)
{
p[t>>5] &= ~(1<<(((unsigned int)t)&31));
}
Standard_EXPORT void ResetAnd();
Standard_EXPORT Standard_Integer And (IntPatch_PrmPrmIntersection_T3Bits& Oth, Standard_Integer& indiceprecedent);
protected:
private:
Standard_Address p;
Standard_Integer* p;
Standard_Integer Isize;
};
#include <IntPatch_PrmPrmIntersection_T3Bits.lxx>
#endif // _IntPatch_PrmPrmIntersection_T3Bits_HeaderFile

View File

@@ -1,30 +0,0 @@
// Created on: 1999-12-16
// Created by: Atelier CAS2000
// Copyright (c) 1999-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
inline void IntPatch_PrmPrmIntersection_T3Bits::Add(const Standard_Integer t)
{
((Standard_Integer *) p)[t>>5] |= (1<<(((unsigned int)t)&31));
}
inline Standard_Integer IntPatch_PrmPrmIntersection_T3Bits::Val(const Standard_Integer t) const
{
return (((Standard_Integer *) p)[t>>5] & (1<<(((unsigned int)t)&31)));
}
inline void IntPatch_PrmPrmIntersection_T3Bits::Raz(const Standard_Integer t)
{
((Standard_Integer *) p)[t>>5] &= ~(1<<(((unsigned int)t)&31));
}