[MacPorts] #40390: codeblocks: fix compatibility with wxWidgets 2.9/3.0
MacPorts
noreply at macports.org
Sun Sep 29 11:41:08 PDT 2013
#40390: codeblocks: fix compatibility with wxWidgets 2.9/3.0
-------------------------+---------------------
Reporter: mojca@… | Owner: mojca@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: codeblocks |
-------------------------+---------------------
Comment (by mojca@…):
Related error:
{{{
libtool: compile: /usr/bin/clang++ -DHAVE_CONFIG_H -I.
-I../../../../../src/include
-I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/lib/wx/include
/osx_cocoa-unicode-2.9
-I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9
-D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__
-D__WXOSX_COCOA__
-I../../../../../src/plugins/contrib/source_exporter/wxPdfDocument/include
-DwxPDF_USE_WXMODULE=0 -I/opt/local/include -Ulinux -Uunix -O2 -ffast-math
-DCB_AUTOCONF -pipe -Os -arch x86_64 -DCB_PRECOMP -Winvalid-pch -fPIC
-DPIC -fexceptions -MT libwxPdfDocument_la-pdfdc.lo -MD -MP -MF .deps
/libwxPdfDocument_la-pdfdc.Tpo -c src/pdfdc.cpp -fno-common -DPIC -o
.libs/libwxPdfDocument_la-pdfdc.o
In file included from src/pdfdc.cpp:26:
src/pdfdc29.inc:1042:14: error: binding of reference to type 'wxPoint' to
a value of type 'const wxPoint' drops qualifiers
wxPoint& point = points[i];
^ ~~~~~~~~~
src/pdfdc29.inc:1071:14: error: binding of reference to type 'wxPoint' to
a value of type 'const wxPoint' drops qualifiers
wxPoint& point = points[i];
^ ~~~~~~~~~
2 errors generated.
make[5]: *** [libwxPdfDocument_la-pdfdc.lo] Error 1
}}}
This turns the previous patch into:
{{{
--- src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfdc29.inc.orig
+++ src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfdc29.inc
@@ -1032,14 +1032,14 @@ wxPdfDCImpl::DoGetSizeMM(int* width, int* height)
const
}
void
-wxPdfDCImpl::DoDrawLines(int n, wxPoint points[], wxCoord xoffset,
wxCoord yoffset)
+wxPdfDCImpl::DoDrawLines(int n, const wxPoint points[], wxCoord xoffset,
wxCoord yoffset)
{
wxCHECK_RET(m_pdfDocument, wxT("Invalid PDF DC"));
SetupPen();
int i;
for (i = 0; i < n; ++i)
{
- wxPoint& point = points[i];
+ const wxPoint& point = points[i];
double xx = ScaleLogicalToPdfX(xoffset + point.x);
double yy = ScaleLogicalToPdfY(yoffset + point.y);
CalcBoundingBox(point.x+xoffset, point.y+yoffset);
@@ -1056,7 +1056,7 @@ wxPdfDCImpl::DoDrawLines(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffs
}
void
-wxPdfDCImpl::DoDrawPolygon(int n, wxPoint points[],
+wxPdfDCImpl::DoDrawPolygon(int n, const wxPoint points[],
wxCoord xoffset, wxCoord yoffset,
wxPolygonFillMode fillStyle /* =
wxODDEVEN_RULE*/)
{
@@ -1068,7 +1068,7 @@ wxPdfDCImpl::DoDrawPolygon(int n, wxPoint points[],
int i;
for (i = 0; i < n; ++i)
{
- wxPoint& point = points[i];
+ const wxPoint& point = points[i];
xp.Add(ScaleLogicalToPdfX(xoffset + point.x));
yp.Add(ScaleLogicalToPdfY(yoffset + point.y));
CalcBoundingBox(point.x + xoffset, point.y + yoffset);
}}}
--
Ticket URL: <https://trac.macports.org/ticket/40390#comment:9>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list