Opened 18 years ago

Closed 16 years ago

Last modified 15 years ago

#33 closed defect (fixed)

Incorrect in-place definition of static members in OffsetCurveBuilder

Reported by: mloskot Owned by: strk@…
Priority: 2 Milestone:
Component: Core Version: main
Severity: Unassigned Keywords: imported, phpbugtracker
Cc:

Description (last modified by mloskot)

In file geos/source/headers/geos/opBuffer.h, static data members are incorrectly defined in-place for class OffsetCurveBuilder:

static const double PI_OVER_2 = 1.570796326794895;
static const double MAX_CLOSING_SEG_LEN = 3.0;

ISO C++ forbids in-place initialization of member constant of non-integral type (const double). Only static const members of integral types can be initialized in-place in class definition.

(according to chapter 9.4.2, point 2 of "Standard for Programming Language C++")

GCC reports it only when used with -pedantic switch. VC++ 8.0 reports it as error by defailt.

Fix applied in attached patch

Attachments (1)

OffsetCurveBuilder-mloskot-20060228.3.patch (1.5 KB ) - added by mateusz@… 18 years ago.
Patch proposal created using cvs diff -Nua

Download all attachments as: .zip

Change History (5)

by mateusz@…, 18 years ago

Patch proposal created using cvs diff -Nua

comment:1 by strk@…, 18 years ago

Resolution: nonefixed

comment:3 by mloskot, 16 years ago

Description: modified (diff)
Milestone: imported
Reporter: changed from mateusz@… to mloskot
Resolution: fixed
Status: closedreopened
Version: 3.0.0svn-trunk

comment:4 by mloskot, 16 years ago

Milestone: 3.0.0
Resolution: fixed
Status: reopenedclosed

comment:5 by (none), 15 years ago

Milestone: 3.0.0

Milestone 3.0.0 deleted

Note: See TracTickets for help on using tickets.