Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ bool BinMDataXtd_ConstraintDriver::Paste(const BinObjMgt_Persistent& theSo
int aType;
if (!(theSource >> aType))
return false;
aC->SetType((TDataXtd_ConstraintEnum)aType);
aC->SetType(static_cast<TDataXtd_ConstraintEnum>(aType));

// flags
int flags;
Expand Down Expand Up @@ -165,7 +165,7 @@ void BinMDataXtd_ConstraintDriver::Paste(
theTarget << aNb;

// constraint type
theTarget << (int)aC->GetType();
theTarget << static_cast<int>(aC->GetType());

// flags
int flags = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ bool BinMDataXtd_GeometryDriver::Paste(const BinObjMgt_Persistent& theSour
int aType;
bool ok = theSource >> aType;
if (ok)
aT->SetType((TDataXtd_GeometryEnum)aType);
aT->SetType(static_cast<TDataXtd_GeometryEnum>(aType));

return ok;
}
Expand All @@ -63,5 +63,5 @@ void BinMDataXtd_GeometryDriver::Paste(
NCollection_IndexedMap<occ::handle<Standard_Transient>>&) const
{
occ::handle<TDataXtd_Geometry> aG = occ::down_cast<TDataXtd_Geometry>(theSource);
theTarget << (int)aG->GetType();
theTarget << static_cast<int>(aG->GetType());
}
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ bool BinMNaming_NamingDriver::Paste(const BinObjMgt_Persistent& theSource,
TopAbs_Orientation OrientationToApply(TopAbs_FORWARD);
if (ok)
{
OrientationToApply = (TopAbs_Orientation)anIndx;
OrientationToApply = static_cast<TopAbs_Orientation>(anIndx);
aName.Orientation(OrientationToApply);
#ifdef OCCT_DEBUG
std::cout << "NamingDriver:: Retrieved Orientation = " << OrientationToApply
Expand Down Expand Up @@ -415,7 +415,7 @@ void BinMNaming_NamingDriver::Paste(
anArray.SetValue(i, anIndx);
}

theTarget.PutIntArray((BinObjMgt_PInteger)&anArray.Value(1), aNbArgs); // keep Array
theTarget.PutIntArray(const_cast<BinObjMgt_PInteger>(&anArray.Value(1)), aNbArgs); // keep Array
}

// 4. keep StopNS
Expand All @@ -440,5 +440,5 @@ void BinMNaming_NamingDriver::Paste(
theTarget << entry;

// 7. keep Orientation
theTarget << (int)aName.Orientation();
theTarget << static_cast<int>(aName.Orientation());
}
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ void BinLDrivers_DocumentRetrievalDriver::Read(Standard_IStream&
BinLDrivers_DocumentSection& aCurSection = anIterS.ChangeValue();
if (!aCurSection.IsPostRead())
{
theIStream.seekg((std::streampos)aCurSection.Offset());
theIStream.seekg(std::streampos(aCurSection.Offset()));
if (aCurSection.Name().IsEqual(SHAPESECTION_POS))
{
ReadShapeSection(aCurSection, theIStream, false, aPS.Next());
Expand Down Expand Up @@ -314,7 +314,7 @@ void BinLDrivers_DocumentRetrievalDriver::Read(Standard_IStream&
if (aShapeSectionPos)
{
aDocumentPos = theIStream.tellg();
theIStream.seekg((std::streampos)aShapeSectionPos);
theIStream.seekg(std::streampos(aShapeSectionPos));

CheckShapeSection(aShapeSectionPos, theIStream);
// Read Shapes
Expand Down Expand Up @@ -388,7 +388,7 @@ void BinLDrivers_DocumentRetrievalDriver::Read(Standard_IStream&
BinLDrivers_DocumentSection& aCurSection = aSectIter.ChangeValue();
if (aCurSection.IsPostRead())
{
theIStream.seekg((std::streampos)aCurSection.Offset());
theIStream.seekg(std::streampos(aCurSection.Offset()));
ReadSection(aCurSection, theDoc, theIStream);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void BinLDrivers_DocumentSection::WriteTOC(Standard_OStream& theStream
#ifdef DO_INVERSE
aBufSz[0] = InverseInt((int)aBufSize);
#else
aBufSz[0] = (int)aBufSize;
aBufSz[0] = static_cast<int>(aBufSize);
#endif
theStream.write(&aBuf[0], aBufSize + sizeof(int));

Expand Down Expand Up @@ -147,7 +147,9 @@ void BinLDrivers_DocumentSection::Write(Standard_OStream& theStream,
"BinLDrivers_DocumentSection::Write : file size is too big, needs int64.");

// Old documents stored file position as 4-bytes values.
int32_t aValInt[3] = {int32_t(myValue[0]), int32_t(myValue[1]), int32_t(myIsPostRead ? 1 : 0)};
int32_t aValInt[3] = {static_cast<int32_t>(myValue[0]),
static_cast<int32_t>(myValue[1]),
static_cast<int32_t>(myIsPostRead ? 1 : 0)};
#ifdef DO_INVERSE
aValInt[0] = InverseInt(aValInt[0]);
aValInt[1] = InverseInt(aValInt[1]);
Expand All @@ -157,7 +159,7 @@ void BinLDrivers_DocumentSection::Write(Standard_OStream& theStream,
}
else
{
uint64_t aVal[3] = {myValue[0], myValue[1], uint64_t(myIsPostRead ? 1 : 0)};
uint64_t aVal[3] = {myValue[0], myValue[1], static_cast<uint64_t>(myIsPostRead ? 1 : 0)};
#ifdef DO_INVERSE
aVal[0] = InverseUint64(aVal[0]);
aVal[1] = InverseUint64(aVal[1]);
Expand Down
2 changes: 1 addition & 1 deletion src/ApplicationFramework/TKBinL/BinMDF/BinMDF_ADriver.lxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
inline const TCollection_AsciiString& BinMDF_ADriver::TypeName() const
{
if (myTypeName.Length() == 0)
(TCollection_AsciiString&)myTypeName += SourceType()->Name();
const_cast<TCollection_AsciiString&>(myTypeName) += SourceType()->Name();
return myTypeName;
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void BinMDataStd_ByteArrayDriver::Paste(
}
uint8_t* aPtr = &aSourceArray(lower);
theTarget.PutByteArray(aPtr, bytes->Length());
theTarget << (uint8_t)(anAtt->GetDelta() ? 1 : 0);
theTarget << static_cast<uint8_t>(anAtt->GetDelta() ? 1 : 0);

// process user defined guid
if (anAtt->ID() != TDataStd_ByteArray::GetID())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void BinMDataStd_ExtStringArrayDriver::Paste(
for (int i = aFirstInd; i <= aLastInd; i++)
theTarget << anAtt->Value(i);

theTarget << (uint8_t)(anAtt->GetDelta() ? 1 : 0);
theTarget << static_cast<uint8_t>(anAtt->GetDelta() ? 1 : 0);

// process user defined guid
if (anAtt->ID() != TDataStd_ExtStringArray::GetID())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,5 @@ void BinMDataStd_IntPackedMapDriver::Paste(
for (; anIt.More(); anIt.Next())
Target << anIt.Key();
}
Target << (uint8_t)(anAtt->GetDelta() ? 1 : 0);
Target << static_cast<uint8_t>(anAtt->GetDelta() ? 1 : 0);
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void BinMDataStd_IntegerArrayDriver::Paste(
theTarget << aFirstInd << aLastInd;
int* aPtr = const_cast<int*>(&aSourceArray(aFirstInd));
theTarget.PutIntArray(aPtr, aLength);
theTarget << (uint8_t)(anAtt->GetDelta() ? 1 : 0);
theTarget << static_cast<uint8_t>(anAtt->GetDelta() ? 1 : 0);

// process user defined guid
if (anAtt->ID() != TDataStd_IntegerArray::GetID())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ bool BinMDataStd_NamedDataDriver::Paste(const BinObjMgt_Persistent& theSou
uint8_t aValue;
if (!(theSource >> aKey >> aValue))
return false;
aBytes.Bind(aKey, (uint8_t)aValue);
aBytes.Bind(aKey, aValue);
}
T->ChangeBytes(aBytes);
}
Expand Down Expand Up @@ -260,7 +260,7 @@ void BinMDataStd_NamedDataDriver::Paste(
NCollection_DataMap<TCollection_ExtendedString, uint8_t>::Iterator itr(S->GetBytesContainer());
for (; itr.More(); itr.Next())
{
theTarget << itr.Key() << (uint8_t)itr.Value();
theTarget << itr.Key() << static_cast<uint8_t>(itr.Value());
}
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void BinMDataStd_RealArrayDriver::Paste(
theTarget << aFirstInd << aLastInd;
double* aPtr = const_cast<double*>(&aSourceArray(aFirstInd));
theTarget.PutRealArray(aPtr, aLength);
theTarget << (uint8_t)(anAtt->GetDelta() ? 1 : 0);
theTarget << static_cast<uint8_t>(anAtt->GetDelta() ? 1 : 0);
// process user defined guid
if (anAtt->ID() != TDataStd_RealArray::GetID())
theTarget << anAtt->ID();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ bool BinMFunction_GraphNodeDriver::Paste(const BinObjMgt_Persistent& theSo
return false;

// Execution status
GN->SetStatus((TFunction_ExecutionStatus)intStatus);
GN->SetStatus(static_cast<TFunction_ExecutionStatus>(intStatus));

// Previous functions
if (nb_previous)
Expand Down Expand Up @@ -101,7 +101,7 @@ void BinMFunction_GraphNodeDriver::Paste(
occ::handle<TFunction_GraphNode> GN = occ::down_cast<TFunction_GraphNode>(theSource);

// Execution status
theTarget << (int)GN->GetStatus();
theTarget << static_cast<int>(GN->GetStatus());
// Number of previous functions
theTarget << GN->GetPrevious().Extent();
// Number of next functions
Expand Down
Loading
Loading