DiscussionsIssue archiveOCCT:Application Framework

Archived issue #0033470

Application Framework - TDataStd_NamedData HasSmth() methods return true for empty containers.

Open CASCADEOCCT:Application Frameworkverified8 public notes

Search issues

Description

It is impossible to nullify internal arrays after removing the last named value, so HasSmth methods will return "true" even if the last value was removed and the container is empty.

example:
//! Returns true if there are some named strings in the attribute.
Standard_Boolean HasStrings() const { return !myStrings.IsNull(); }

It is proposed to add a check for emptiness to the HasSmth methods.

Steps to reproduce

not needed

Public activity

8 archived notes

Participants are labeled by their role within this record.

01Commenter 1
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Thu Sep 7 15:02:05 2023 +0100

    0033470: Application Framework - TDataStd_NamedData HasSmth() methods return true for empty containers.
    
    Add checks for empty containers.
02Commenter 1
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
03Commenter 1
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
04Commenter 1
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
05Author
Dear Commenter 2,

please review the CR33470 branch.
(The last update was a removal of extra empty line)

test results:
http://jenkins-test-10.nnov.opencascade.com/view/CR33470-master-ika/view/COMPARE/
06Commenter 2
Dear bugmaster,
please integrate:
OCCT: CR33470
PPOD: No
07Commenter 3
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Ubuntu2004-64:
OCCT
Total CPU difference: 18396.81000000019 / 18263.300000000214 [+0.73%]
Products
Total CPU difference: 12050.180000000018 / 12050.169999999993 [+0.00%]
Windows-64-VC142:
OCCT
Total CPU difference: 19139.078125 / 18426.265625 [+3.87%]
Products
Total CPU difference: 14235.40625 / 13940.40625 [+2.12%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
08Commenter 1
Branch [archived branch] has been deleted by Participant.

[revision removed]