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

0033375: Coding - Static Analyzing processing. Performance

Performance update applied:
  - moving to const reference as much as possible
Result of CLANG_TIDY (static analyzing filter: perform*)
This commit is contained in:
dpasukhi
2023-05-06 22:56:45 +00:00
committed by vglukhik
parent c28dd7f1cf
commit b2fedee6a1
265 changed files with 603 additions and 611 deletions

View File

@@ -179,9 +179,9 @@ NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)>& Transf
NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)>::Iterator iter(list);
for (; iter.More(); iter.Next()) {
TCollection_AsciiString name = iter.Key();
const TCollection_AsciiString& name = iter.Key();
if (!name.StartsWith(fromname)) continue;
Handle(Standard_Transient) atr = iter.Value();
const Handle(Standard_Transient)& atr = iter.Value();
Handle(Standard_Transient) newatr = atr;
// Copy ? according type

View File

@@ -37,7 +37,7 @@ Transfer_TransferInput::Transfer_TransferInput () { }
{
Interface_EntityIterator iter;
for (list.Start(); list.More(); list.Next()) {
Handle(Transfer_Binder) binder = list.Value();
const Handle(Transfer_Binder)& binder = list.Value();
if (binder.IsNull()) continue;
if (binder->IsKind(STANDARD_TYPE(Transfer_VoidBinder))) continue;

View File

@@ -93,7 +93,7 @@ void Transfer_TransferOutput::TransferRoots (const Handle(Interface_Protocol)& p
Interface_EntityIterator list = tool.RootEntities();
Message_ProgressScope aPS(theProgress, NULL, list.NbEntities());
for (list.Start(); list.More() && aPS.More(); list.Next()) {
Handle(Standard_Transient) ent = list.Value();
const Handle(Standard_Transient)& ent = list.Value();
// Standard_Integer scope = 0;
// if (thescope) scope = theproc->NewScope (ent);
if (theproc->Transfer (ent, aPS.Next())) theproc->SetRoot(ent);
@@ -110,7 +110,7 @@ void Transfer_TransferOutput::TransferRoots (const Interface_Graph& G,
Interface_EntityIterator list = tool.RootEntities();
Message_ProgressScope aPS(theProgress, NULL, list.NbEntities());
for (list.Start(); list.More() && aPS.More(); list.Next()) {
Handle(Standard_Transient) ent = list.Value();
const Handle(Standard_Transient)& ent = list.Value();
// Standard_Integer scope = 0;
// if (thescope) scope = theproc->NewScope (ent);
if (theproc->Transfer (ent, aPS.Next())) theproc->SetRoot(ent);