View Issue Details

IDProjectCategoryView StatusLast Update
0026799CommunityOCCT:Documentationpublic2016-04-20 15:51
ReporterVico Liang Assigned Tobugmaster  
PrioritynormalSeveritymajor 
Status closedResolutionfixed 
Product Version6.9.1 
Target Version7.0.0Fixed in Version7.0.0 
Summary0026799: NCollection_Array2's RowLength and ColLength return wrong value.
DescriptionPlease see the implementation of these two methods RowLength and ColLength:
The RowLength() returns the column length value while ColLength() returns the row length value.

Please swap these two method implementation codes to fix the isue.

  //! RowLength
  Standard_Integer RowLength (void) const
  { return (myUpperCol-myLowerCol+1); }
  //! ColLength
  Standard_Integer ColLength (void) const
  { return (myUpperRow-myLowerRow+1); }
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberNot needed

Activities

abv

2015-10-23 22:29

manager   ~0047409

Hello Vico,

I guess you may be confused by names of these methods: "RowLength" means length of the row (nb. of columns), and not nb. of rows, as you probably expect. Consider array of 2 rows, 3 columns:

Array1 (1, 2, 1, 3);

11 12 13
21 22 23

Here RowLength() should return 3, and ColLength() should be 2.

git

2015-10-24 08:01

administrator   ~0047411

Branch CR26799 has been created by abv.

SHA-1: 7a27a25ebd8846694f56a6e6e624e87c453851ba


Detailed log of new commits:

Author: abv
Date: Sat Oct 24 08:00:58 2015 +0300

    0026799: NCollection_Array2's RowLength and ColLength return wrong value.
    
    Comments to methods RowLength() and ColLength() improved to avoid possible misinterpretation

abv

2015-10-24 08:02

manager   ~0047412

I have improved comments to these methods to avoid such kind of confusion, please review

Vico Liang

2015-10-24 15:22

developer   ~0047418

Dear abv,

Right that i'm confused. The improved comments is clear for these two methods. Thanks for the improvement.

abv

2015-10-24 16:54

manager   ~0047420

Please integrate, no testing is needed

git

2016-04-17 14:35

administrator   ~0053203

Branch CR26799 has been deleted by kgv.

SHA-1: 7a27a25ebd8846694f56a6e6e624e87c453851ba

Related Changesets

occt: master 9535c4be

2015-10-24 05:00:58

abv


Committer: bugmaster Details Diff
0026799: NCollection_Array2's RowLength and ColLength return wrong value.

Comments to methods RowLength() and ColLength() improved to avoid possible misinterpretation
Affected Issues
0026799
mod - src/NCollection/NCollection_Array2.hxx Diff File

Issue History

Date Modified Username Field Change
2015-10-22 10:38 Vico Liang New Issue
2015-10-22 10:38 Vico Liang Assigned To => abv
2015-10-23 22:29 abv Note Added: 0047409
2015-10-24 08:01 git Note Added: 0047411
2015-10-24 08:02 abv Note Added: 0047412
2015-10-24 08:02 abv Assigned To abv => Vico Liang
2015-10-24 08:02 abv Status new => resolved
2015-10-24 08:02 abv Steps to Reproduce Updated
2015-10-24 15:22 Vico Liang Note Added: 0047418
2015-10-24 15:26 Vico Liang Assigned To Vico Liang => abv
2015-10-24 16:54 abv Note Added: 0047420
2015-10-24 16:54 abv Assigned To abv => bugmaster
2015-10-24 16:54 abv Status resolved => reviewed
2015-10-24 18:26 abv Category OCCT:Foundation Classes => OCCT:Documentation
2015-10-26 12:12 apv Test case number => Not needed
2015-10-26 12:12 apv Status reviewed => tested
2015-10-30 16:00 bugmaster Changeset attached => occt master 9535c4be
2015-10-30 16:00 bugmaster Status tested => verified
2015-10-30 16:00 bugmaster Resolution open => fixed
2016-04-17 14:35 git Note Added: 0053203
2016-04-20 15:42 aiv Fixed in Version => 7.0.0
2016-04-20 15:51 aiv Status verified => closed