Opened 18 years ago

Last modified 15 years ago

#93 closed defect (fixed)

getDimension() - Possible overflow of unsigned int type — at Initial Version

Reported by: mateusz@… Owned by: strk@…
Priority: major Milestone:
Component: Core Version: main
Severity: Significant Keywords: imported, phpbugtracker
Cc:

Description

Dimension class is mainly a manager of enum 

enum DimensionType {
   DONTCARE=-3,
   True,
   False,
   P,
   L,
   A
};

Enumerators in the DimensionType are of type of signed int but NOT unsigned.

Problems:

- inconsistency - getDimension() function member in classes of Geometry hierarchy mixing signed int and unsigned int.

-  getDimension() in classes CoordinateSequence and CoordinateArraySequence returns unsigned int, so it's consusing as well as potentially danger when someone will want to return less-than-zero value of DimensionType enum, example:

unsigned int getDimension()
{
   return -3;
}

Change History (0)

Note: See TracTickets for help on using tickets.