Skip to content

Commit c020fc2

Browse files
authored
Coding - Clang-Tidy apply with refactoring (#965)
- Replacing empty constructor/destructor implementations with `= default` - Removing redundant `virtual` keywords from override methods - Replacing `NULL` and `0` with `nullptr` - Replacing C headers with C++ equivalents (`<cstdio>`, `<cstring>`, etc.) - Marking copy constructors/assignment operators as `= delete` for non-copyable classes - Converting `void` parameter lists to empty parameter lists - Replacing integer literals with appropriate boolean values
1 parent 14d4e91 commit c020fc2

4,823 files changed

Lines changed: 15746 additions & 16565 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/ApplicationFramework/TKBin/BinDrivers/BinDrivers_DocumentRetrievalDriver.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ IMPLEMENT_STANDARD_RTTIEXT(BinDrivers_DocumentRetrievalDriver, BinLDrivers_Docum
3232

3333
//=================================================================================================
3434

35-
BinDrivers_DocumentRetrievalDriver::BinDrivers_DocumentRetrievalDriver() {}
35+
BinDrivers_DocumentRetrievalDriver::BinDrivers_DocumentRetrievalDriver() = default;
3636

3737
//=================================================================================================
3838

src/ApplicationFramework/TKBin/BinDrivers/BinDrivers_DocumentRetrievalDriver.hxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,23 @@ public:
3333
//! Constructor
3434
Standard_EXPORT BinDrivers_DocumentRetrievalDriver();
3535

36-
Standard_EXPORT virtual occ::handle<BinMDF_ADriverTable> AttributeDrivers(
36+
Standard_EXPORT occ::handle<BinMDF_ADriverTable> AttributeDrivers(
3737
const occ::handle<Message_Messenger>& theMsgDriver) override;
3838

39-
Standard_EXPORT virtual void ReadShapeSection(
39+
Standard_EXPORT void ReadShapeSection(
4040
BinLDrivers_DocumentSection& theSection,
4141
Standard_IStream& theIS,
4242
const bool isMess = false,
4343
const Message_ProgressRange& theRange = Message_ProgressRange()) override;
4444

45-
Standard_EXPORT virtual void CheckShapeSection(const Storage_Position& thePos,
46-
Standard_IStream& theIS) override;
45+
Standard_EXPORT void CheckShapeSection(const Storage_Position& thePos,
46+
Standard_IStream& theIS) override;
4747

4848
//! Clears the NamedShape driver
49-
Standard_EXPORT virtual void Clear() override;
49+
Standard_EXPORT void Clear() override;
5050

5151
//! Enables reading in the quick part access mode.
52-
Standard_EXPORT virtual void EnableQuickPartReading(
52+
Standard_EXPORT void EnableQuickPartReading(
5353
const occ::handle<Message_Messenger>& theMessageDriver,
5454
bool theValue) override;
5555

src/ApplicationFramework/TKBin/BinDrivers/BinDrivers_DocumentStorageDriver.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ IMPLEMENT_STANDARD_RTTIEXT(BinDrivers_DocumentStorageDriver, BinLDrivers_Documen
2929

3030
//=================================================================================================
3131

32-
BinDrivers_DocumentStorageDriver::BinDrivers_DocumentStorageDriver() {}
32+
BinDrivers_DocumentStorageDriver::BinDrivers_DocumentStorageDriver() = default;
3333

3434
//=================================================================================================
3535

src/ApplicationFramework/TKBin/BinDrivers/BinDrivers_DocumentStorageDriver.hxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ public:
3232
//! Constructor
3333
Standard_EXPORT BinDrivers_DocumentStorageDriver();
3434

35-
Standard_EXPORT virtual occ::handle<BinMDF_ADriverTable> AttributeDrivers(
35+
Standard_EXPORT occ::handle<BinMDF_ADriverTable> AttributeDrivers(
3636
const occ::handle<Message_Messenger>& theMsgDriver) override;
3737

3838
//! implements the procedure of writing a shape section to file
39-
Standard_EXPORT virtual void WriteShapeSection(
39+
Standard_EXPORT void WriteShapeSection(
4040
BinLDrivers_DocumentSection& theDocSection,
4141
Standard_OStream& theOS,
4242
const TDocStd_FormatVersion theDocVer,
@@ -60,7 +60,7 @@ public:
6060
const bool theValue) override;
6161

6262
//! Clears the NamedShape driver
63-
Standard_EXPORT virtual void Clear() override;
63+
Standard_EXPORT void Clear() override;
6464

6565
DEFINE_STANDARD_RTTIEXT(BinDrivers_DocumentStorageDriver, BinLDrivers_DocumentStorageDriver)
6666
};

src/ApplicationFramework/TKBin/BinMDataXtd/BinMDataXtd_ConstraintDriver.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ IMPLEMENT_STANDARD_RTTIEXT(BinMDataXtd_ConstraintDriver, BinMDF_ADriver)
3030

3131
BinMDataXtd_ConstraintDriver::BinMDataXtd_ConstraintDriver(
3232
const occ::handle<Message_Messenger>& theMsgDriver)
33-
: BinMDF_ADriver(theMsgDriver, NULL)
33+
: BinMDF_ADriver(theMsgDriver, nullptr)
3434
{
3535
}
3636

src/ApplicationFramework/TKBin/BinMDataXtd/BinMDataXtd_GeometryDriver.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ IMPLEMENT_STANDARD_RTTIEXT(BinMDataXtd_GeometryDriver, BinMDF_ADriver)
2828

2929
BinMDataXtd_GeometryDriver::BinMDataXtd_GeometryDriver(
3030
const occ::handle<Message_Messenger>& theMsgDriver)
31-
: BinMDF_ADriver(theMsgDriver, NULL)
31+
: BinMDF_ADriver(theMsgDriver, nullptr)
3232
{
3333
}
3434

src/ApplicationFramework/TKBin/BinMDataXtd/BinMDataXtd_PatternStdDriver.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ IMPLEMENT_STANDARD_RTTIEXT(BinMDataXtd_PatternStdDriver, BinMDF_ADriver)
3131

3232
BinMDataXtd_PatternStdDriver::BinMDataXtd_PatternStdDriver(
3333
const occ::handle<Message_Messenger>& theMsgDriver)
34-
: BinMDF_ADriver(theMsgDriver, NULL)
34+
: BinMDF_ADriver(theMsgDriver, nullptr)
3535
{
3636
}
3737

src/ApplicationFramework/TKBin/BinMDataXtd/BinMDataXtd_TriangulationDriver.hxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ public:
3434
Standard_EXPORT BinMDataXtd_TriangulationDriver(
3535
const occ::handle<Message_Messenger>& theMessageDriver);
3636

37-
Standard_EXPORT virtual occ::handle<TDF_Attribute> NewEmpty() const override;
37+
Standard_EXPORT occ::handle<TDF_Attribute> NewEmpty() const override;
3838

39-
Standard_EXPORT virtual bool Paste(const BinObjMgt_Persistent& Source,
40-
const occ::handle<TDF_Attribute>& Target,
41-
BinObjMgt_RRelocationTable& RelocTable) const override;
39+
Standard_EXPORT bool Paste(const BinObjMgt_Persistent& Source,
40+
const occ::handle<TDF_Attribute>& Target,
41+
BinObjMgt_RRelocationTable& RelocTable) const override;
4242

43-
Standard_EXPORT virtual void Paste(
43+
Standard_EXPORT void Paste(
4444
const occ::handle<TDF_Attribute>& Source,
4545
BinObjMgt_Persistent& Target,
4646
NCollection_IndexedMap<occ::handle<Standard_Transient>>& RelocTable) const override;

src/ApplicationFramework/TKBin/BinMNaming/BinMNaming_NamedShapeDriver.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static int TranslateFrom(const BinObjMgt_Persistent& theSource,
172172
BinMNaming_NamedShapeDriver::BinMNaming_NamedShapeDriver(
173173
const occ::handle<Message_Messenger>& theMsgDriver)
174174
: BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(TNaming_NamedShape)->Name()),
175-
myShapeSet(NULL),
175+
myShapeSet(nullptr),
176176
myWithTriangles(false),
177177
myWithNormals(false),
178178
myIsQuickPart(false)
@@ -213,7 +213,7 @@ bool BinMNaming_NamedShapeDriver::Paste(const BinObjMgt_Persistent& theSou
213213
aTAtt->SetVersion(anEvol);
214214

215215
BinTools_ShapeSetBase* aShapeSet = const_cast<BinMNaming_NamedShapeDriver*>(this)->ShapeSet(true);
216-
Standard_IStream* aDirectStream = NULL;
216+
Standard_IStream* aDirectStream = nullptr;
217217
if (myIsQuickPart) // enables direct reading of shapes from the stream
218218
aDirectStream = const_cast<BinObjMgt_Persistent*>(&theSource)->GetIStream();
219219

@@ -302,7 +302,7 @@ void BinMNaming_NamedShapeDriver::Paste(
302302
theTarget << aSAtt->Version();
303303
theTarget << EvolutionToChar(anEvol);
304304

305-
Standard_OStream* aDirectStream = NULL;
305+
Standard_OStream* aDirectStream = nullptr;
306306
if (myIsQuickPart) // enables direct writing of shapes to the stream
307307
aDirectStream = theTarget.GetOStream();
308308

@@ -357,7 +357,7 @@ void BinMNaming_NamedShapeDriver::Clear()
357357
{
358358
myShapeSet->Clear();
359359
delete myShapeSet;
360-
myShapeSet = NULL;
360+
myShapeSet = nullptr;
361361
}
362362
}
363363

src/ApplicationFramework/TKBinL/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void BinLDrivers_DocumentRetrievalDriver::Read(const TCollection_ExtendedString&
7373
std::shared_ptr<std::istream> aFileStream =
7474
aFileSystem->OpenIStream(theFileName, std::ios::in | std::ios::binary);
7575

76-
if (aFileStream.get() != NULL && aFileStream->good())
76+
if (aFileStream.get() != nullptr && aFileStream->good())
7777
{
7878
occ::handle<Storage_Data> dData;
7979
TCollection_ExtendedString aFormat = PCDM_ReadWriter::FileFormat(*aFileStream, dData);

0 commit comments

Comments
 (0)