WSL/SLF GitLab Repository

Commit 2337bec5 authored by Thomas Egger's avatar Thomas Egger
Browse files

DEMObject: need to call the << >> operator of the parent class Grid2DObject in...

DEMObject: need to call the << >> operator of the parent class Grid2DObject in own operator<< and operator>>
parent 206e2e66
...@@ -1027,6 +1027,8 @@ double DEMObject::safeGet(const int i, const int j) ...@@ -1027,6 +1027,8 @@ double DEMObject::safeGet(const int i, const int j)
} }
std::iostream& operator<<(std::iostream& os, const DEMObject& dem) { std::iostream& operator<<(std::iostream& os, const DEMObject& dem) {
operator<<(os, *((Grid2DObject*)&dem));
os << dem.slope; os << dem.slope;
os << dem.azi; os << dem.azi;
os << dem.curvature; os << dem.curvature;
...@@ -1047,6 +1049,8 @@ std::iostream& operator<<(std::iostream& os, const DEMObject& dem) { ...@@ -1047,6 +1049,8 @@ std::iostream& operator<<(std::iostream& os, const DEMObject& dem) {
} }
std::iostream& operator>>(std::iostream& is, DEMObject& dem) { std::iostream& operator>>(std::iostream& is, DEMObject& dem) {
operator>>(is, *((Grid2DObject*)&dem));
is >> dem.slope; is >> dem.slope;
is >> dem.azi; is >> dem.azi;
is >> dem.curvature; is >> dem.curvature;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment