Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions src/ApplicationFramework/TKCDF/PCDM/PCDM_ReadWriter_1.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,13 @@ Standard_Integer PCDM_ReadWriter_1::ReadReferenceCounter(
{
if (refUserInfo(i).Search(REFERENCE_COUNTER) != -1)
{
try
TCollection_AsciiString aToken = refUserInfo(i).Token(" ", 2);
if (aToken.IsIntegerValue())
{
OCC_CATCH_SIGNALS theReferencesCounter = refUserInfo(i).Token(" ", 2).IntegerValue();
theReferencesCounter = aToken.IntegerValue();

Copilot AI Aug 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable name 'aToken' follows OCCT naming conventions correctly, but consider using a more descriptive name like 'aCounterToken' to better express its purpose in this context.

Copilot uses AI. Check for mistakes.
}
catch (Standard_Failure const&)
else
{
// std::cout << "warning: could not read the reference counter in " << aFileName <<
// std::endl;
TCollection_ExtendedString aMsg("Warning: ");
aMsg = aMsg.Cat("could not read the reference counter in ").Cat(aFileName).Cat("\0");
if (!theMsgDriver.IsNull())
Expand Down Expand Up @@ -426,13 +425,13 @@ Standard_Integer PCDM_ReadWriter_1::ReadDocumentVersion(
{
if (refUserInfo(i).Search(MODIFICATION_COUNTER) != -1)
{
try
TCollection_AsciiString aToken = refUserInfo(i).Token(" ", 2);
if (aToken.IsIntegerValue())
{
OCC_CATCH_SIGNALS theVersion = refUserInfo(i).Token(" ", 2).IntegerValue();
theVersion = aToken.IntegerValue();

Copilot AI Aug 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the reference counter case, consider using a more descriptive variable name like 'aVersionToken' instead of the generic 'aToken' for better code clarity.

Copilot uses AI. Check for mistakes.
}
catch (Standard_Failure const&)
else
{
// std::cout << "warning: could not read the version in " << aFileName << std::endl;
TCollection_ExtendedString aMsg("Warning: ");
aMsg = aMsg.Cat("could not read the version in ").Cat(aFileName).Cat("\0");
if (!theMsgDriver.IsNull())
Expand Down
9 changes: 4 additions & 5 deletions src/Draw/TKXSDRAWSTL/XSDRAWSTL/XSDRAWSTL.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -820,14 +820,13 @@ static Standard_Integer meshcolors(Draw_Interpretor& theDI,
aDataSource->GetGeom(anIter.Key(), Standard_False, aCoords, aNbNodes, aType);

Standard_Real aScaleValue;
try
if (aDelta > Precision::Confusion())
{
OCC_CATCH_SIGNALS
aScaleValue = (aCoords.Value(1) - (Standard_Real)aMinX) / aDelta;
aScaleValue = (aCoords.Value(1) - aMinX) / aDelta;
}
catch (Standard_Failure const&)
else
{
aScaleValue = 0;
aScaleValue = 0.0;
}

aScaleMap.Bind(anIter.Key(), aScaleValue);
Expand Down
Loading