PhyObj::load() takes const ptr

This commit is contained in:
Josh Holtrop 2011-05-21 23:45:13 -04:00
parent 5a0eea19f5
commit be15f95560
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ PhyObj::Geom::Geom(PhyObj::GeomType type, refptr< vector<float> > args)
/********** PhyObj functions **********/ /********** PhyObj functions **********/
void PhyObj::load(unsigned char *data, unsigned int size) void PhyObj::load(const unsigned char *data, unsigned int size)
{ {
string str((char *) data, size); string str((char *) data, size);
stringstream istr(str, ios_base::in); stringstream istr(str, ios_base::in);

View File

@ -28,7 +28,7 @@ class PhyObj
}; };
/* Methods */ /* Methods */
void load(unsigned char *data, unsigned int size); void load(const unsigned char *data, unsigned int size);
size_t getNumGeoms() { return m_geoms.size(); } size_t getNumGeoms() { return m_geoms.size(); }
refptr<Geom> getGeom(int i) { return m_geoms[i]; } refptr<Geom> getGeom(int i) { return m_geoms[i]; }