Commit 4cd89f7fc9a3846e9d42b1d401453b8b55a2990f

  • avatar
  • Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>
  • Fri Jul 30 00:30:40 CEST 2010
Changed the FloatData class to store double instead of single floats.

Also fixed a few compile warnings.
  
215215
216216 Position dest = mMap->checkNodeOffsets(getCollisionRadius(), getWalkMask(),
217217 dstX, dstY);
218 Path thisPath = mMap->findPixelPath(mPos.x, mPos.y, dest.x, dest.y,
219 getCollisionRadius(), getWalkMask());
218 Path thisPath = mMap->findPixelPath((int) mPos.x, (int) mPos.y,
219 dest.x, dest.y,
220 getCollisionRadius(), getWalkMask());
220221
221222 if (thisPath.empty())
222223 {
  
3535 return new IntData(defData);
3636}
3737
38VariableData* createData(double defData)
39{
40 return new FloatData(defData);
41}
42
3843VariableData* createData(float defData)
3944{
4045 return new FloatData(defData);
  
3131class Listener
3232{
3333public:
34 ~Listener();
34 virtual ~Listener();
3535
3636 void listen(const std::string &channel);
3737
  
7272class FloatData : public VariableData
7373{
7474public:
75 FloatData(float value) { mData = value; }
75 FloatData(double value) { mData = value; }
7676
77 float getData() const { return mData; }
77 double getData() const { return mData; }
7878
7979 int getType() const { return DATA_FLOAT; }
8080
8181private:
82 float mData;
82 double mData;
8383};
8484
8585class BoolData : public VariableData