diff --git a/src/gui/gesture/gesture.cc b/src/gui/gesture/gesture.cc index a1b40fb7..e985ac84 100644 --- a/src/gui/gesture/gesture.cc +++ b/src/gui/gesture/gesture.cc @@ -186,9 +186,9 @@ void Gesture::serialize(std::ostream& out){ const int count = strokes.size(); // Write gesture ID - //out.writeLong(mGestureID); + GestureIOHelper::writeLong(out,mGestureID); // Write number of strokes - //out.writeInt(count); + GestureIOHelper::writeInt(out,count); for (int i = 0; i < count; i++) { strokes.at(i)->serialize(out); diff --git a/src/gui/gesture/gesturepoint.h b/src/gui/gesture/gesturepoint.h index 0bde7ada..46320596 100644 --- a/src/gui/gesture/gesturepoint.h +++ b/src/gui/gesture/gesturepoint.h @@ -1,5 +1,6 @@ #ifndef __GESTURE_POINT_H__ #define __GESTURE_POINT_H__ +#include namespace cdroid{ class GesturePoint { public: @@ -14,10 +15,10 @@ public: } static GesturePoint deserialize(std::istream& in) { // Read X and Y - const float x =1;// in.readFloat(); - const float y =1;// in.readFloat(); + const float x = GestureIOHelper::readFloat(in); + const float y = GestureIOHelper::readFloat(in); // Read timestamp - const long timeStamp =1;// in.readLong(); + const long timeStamp = GestureIOHelper::readLong(in); return GesturePoint{x, y, timeStamp}; } };