1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

Coding - Fixing clang-tidy warnings #207

First iteration for fixing warnings for:
- TKernel
- TKMath
- TKGeomBase
This commit is contained in:
dpasukhi
2024-12-21 15:32:44 +00:00
parent 0ffcc44c82
commit f7dea47c33
35 changed files with 93 additions and 161 deletions

View File

@@ -973,7 +973,7 @@ Storage_Error FSD_BinaryFile::EndWriteTypeSection()
Storage_Error FSD_BinaryFile::BeginReadTypeSection()
{
if (!fseek(myStream,myHeader.btype,SEEK_SET)) return Storage_VSOk;
else return Storage_VSSectionNotFound;
else return Storage_VSSectionNotFound;
}
//=======================================================================
@@ -1030,7 +1030,7 @@ void FSD_BinaryFile::ReadTypeInformations(Standard_IStream& theIStream, Standard
Storage_Error FSD_BinaryFile::EndReadTypeSection()
{
if (!fseek(myStream,myHeader.etype,SEEK_SET)) return Storage_VSOk;
if (!fseek(myStream,myHeader.etype,SEEK_SET)) return Storage_VSOk;
else return Storage_VSSectionNotFound;
}
@@ -1085,7 +1085,7 @@ Storage_Error FSD_BinaryFile::EndWriteRootSection()
Storage_Error FSD_BinaryFile::BeginReadRootSection()
{
if (!fseek(myStream,myHeader.broot,SEEK_SET)) return Storage_VSOk;
if (!fseek(myStream,myHeader.broot,SEEK_SET)) return Storage_VSOk;
else return Storage_VSSectionNotFound;
}
@@ -1145,7 +1145,7 @@ void FSD_BinaryFile::ReadRoot (Standard_IStream& theIStream, TCollection_AsciiSt
Storage_Error FSD_BinaryFile::EndReadRootSection()
{
if (!fseek(myStream,myHeader.eroot,SEEK_SET)) return Storage_VSOk;
if (!fseek(myStream,myHeader.eroot,SEEK_SET)) return Storage_VSOk;
else return Storage_VSSectionNotFound;
}
@@ -1199,7 +1199,7 @@ Storage_Error FSD_BinaryFile::EndWriteRefSection()
Storage_Error FSD_BinaryFile::BeginReadRefSection()
{
if (!fseek(myStream,myHeader.bref,SEEK_SET)) return Storage_VSOk;
if (!fseek(myStream,myHeader.bref,SEEK_SET)) return Storage_VSOk;
else return Storage_VSSectionNotFound;
}
@@ -1258,7 +1258,7 @@ void FSD_BinaryFile::ReadReferenceType (Standard_IStream& theIStream, Standard_I
Storage_Error FSD_BinaryFile::EndReadRefSection()
{
if (!fseek(myStream,myHeader.eref,SEEK_SET)) return Storage_VSOk;
if (!fseek(myStream,myHeader.eref,SEEK_SET)) return Storage_VSOk;
else return Storage_VSSectionNotFound;
}
@@ -1342,7 +1342,7 @@ Storage_Error FSD_BinaryFile::EndWriteDataSection()
Storage_Error FSD_BinaryFile::BeginReadDataSection()
{
if (!fseek(myStream,myHeader.bdata,SEEK_SET)) return Storage_VSOk;
if (!fseek(myStream,myHeader.bdata,SEEK_SET)) return Storage_VSOk;
else return Storage_VSSectionNotFound;
}
@@ -1401,7 +1401,7 @@ void FSD_BinaryFile::EndReadPersistentObjectData()
Storage_Error FSD_BinaryFile::EndReadDataSection()
{
if (!fseek(myStream,myHeader.edata,SEEK_SET)) return Storage_VSOk;
if (!fseek(myStream,myHeader.edata,SEEK_SET)) return Storage_VSOk;
else return Storage_VSSectionNotFound;
}

View File

@@ -69,7 +69,7 @@ Storage_Error FSD_CmpFile::Open(const TCollection_AsciiString& aName, const Stor
SetName(aName);
if (OpenMode() == Storage_VSNone) {
std::ios_base::openmode anOpenMode = std::ios_base::openmode(0);
std::ios_base::openmode anOpenMode = std::ios_base::openmode{};
switch (aMode)
{
case Storage_VSNone:

View File

@@ -84,7 +84,7 @@ Storage_Error FSD_File::Open(const TCollection_AsciiString& aName,const Storage_
if (OpenMode() == Storage_VSNone)
{
std::ios_base::openmode anOpenMode = std::ios_base::openmode(0);
std::ios_base::openmode anOpenMode = std::ios_base::openmode{};
switch (aMode)
{
case Storage_VSNone:
@@ -237,7 +237,7 @@ void FSD_File::WriteExtendedLine(const TCollection_ExtendedString& buffer)
void FSD_File::ReadExtendedLine(TCollection_ExtendedString& buffer)
{
char c = '\0';
Standard_ExtCharacter i = 0,j,count = 0;
Standard_ExtCharacter i = 0,count = 0;
Standard_Boolean fin = Standard_False;
Standard_CString tg = ENDOFNORMALEXTENDEDSECTION;
@@ -249,7 +249,6 @@ void FSD_File::ReadExtendedLine(TCollection_ExtendedString& buffer)
if (c == tg[count]) count++;
else count = 0;
if (count < SIZEOFNORMALEXTENDEDSECTION) {
j = 0;
i = (Standard_ExtCharacter)c;
if (c == '\0') fin = Standard_True;
i = (i << 8);
@@ -258,10 +257,9 @@ void FSD_File::ReadExtendedLine(TCollection_ExtendedString& buffer)
if (c == tg[count]) count++;
else count = 0;
if (count < SIZEOFNORMALEXTENDEDSECTION) {
j = (Standard_ExtCharacter)c;
if (c != '\n') {
fin = Standard_False;
i |= (0x00FF & j);
i |= (0x00FF & (Standard_ExtCharacter)c);
buffer += (Standard_ExtCharacter)i;
}
}