Opened 6 years ago
Closed 6 years ago
#863 closed defect (fixed)
DEBUG_BYTEORDER_VALUES=1 does not build
Reported by: | goatbar | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 3.6.3 |
Component: | Default | Version: | 3.6.2 |
Severity: | Annoyance | Keywords: | debugging |
Cc: |
Description
Missing includes and missing std::
Also, most other switches are #ifdef
rather than #if
, so maybe that should change too.
-
src/io/ByteOrderValues.cpp
a b 23 23 #include <cstring> 24 24 #include <cassert> 25 25 26 #if DEBUG_BYTEORDER_VALUES 27 #include <ios> 28 #include <iostream> 29 #endif 30 26 31 namespace geos { 27 32 namespace io { // geos.io 28 33 … … 143 148 int64 longValue; 144 149 std::memcpy(&longValue, &doubleValue, sizeof(double)); 145 150 #if DEBUG_BYTEORDER_VALUES 146 cout<<"ByteOrderValues::putDouble("<<doubleValue<<151 std::cout<<"ByteOrderValues::putDouble("<<doubleValue<< 147 152 ", order:"<<byteOrder 148 <<") = "<< hex;153 <<") = "<<std::hex; 149 154 for (int i=0; i<8; i++) 150 cout<<"["<<(int)buf[i]<<"]";151 cout<<dec<<endl;155 std::cout<<"["<<(int)buf[i]<<"]"; 156 std::cout<<std::dec<<std::endl; 152 157 #endif 153 158 putLong(longValue, buf, byteOrder); 154 159 }
Note:
See TracTickets
for help on using tickets.
I think there is still more that can be done to improve the eof checks, but here is what I ended up with after code review. I'll try to get the tests I've been working on out in the autotest2 tree in the next few days. I have more work to do for coverage.