[geos-devel] [GEOS] #863: DEBUG_BYTEORDER_VALUES=1 does not build
GEOS
geos-trac at osgeo.org
Fri Mar 16 07:34:40 PDT 2018
#863: DEBUG_BYTEORDER_VALUES=1 does not build
-----------------------+--------------------------
Reporter: goatbar | Owner: geos-devel@…
Type: defect | Status: new
Priority: minor | Milestone: 3.6.3
Component: Default | Version: 3.6.2
Severity: Annoyance | Keywords: debugging
-----------------------+--------------------------
Missing includes and missing std::
Also, most other switches are `#ifdef` rather than `#if`, so maybe that
should change too.
{{{#!patch
--- a/src/io/ByteOrderValues.cpp 2017-10-20 17:04:17.000000000
-0700
+++ b/src/io/ByteOrderValues.cpp 2018-03-15 22:25:50.000000000
-0700
@@ -23,6 +23,11 @@
#include <cstring>
#include <cassert>
+#if DEBUG_BYTEORDER_VALUES
+#include <ios>
+#include <iostream>
+#endif
+
namespace geos {
namespace io { // geos.io
@@ -143,12 +148,12 @@
int64 longValue;
std::memcpy(&longValue, &doubleValue, sizeof(double));
#if DEBUG_BYTEORDER_VALUES
- cout<<"ByteOrderValues::putDouble("<<doubleValue<<
+ std::cout<<"ByteOrderValues::putDouble("<<doubleValue<<
", order:"<<byteOrder
- <<") = "<<hex;
+ <<") = "<<std::hex;
for (int i=0; i<8; i++)
- cout<<"["<<(int)buf[i]<<"]";
- cout<<dec<<endl;
+ std::cout<<"["<<(int)buf[i]<<"]";
+ std::cout<<std::dec<<std::endl;
#endif
putLong(longValue, buf, byteOrder);
}
}}}
--
Ticket URL: <https://trac.osgeo.org/geos/ticket/863>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
More information about the geos-devel
mailing list