Added some const declarations.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1689 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2008-04-17 04:37:49 +00:00
parent a53ca214c5
commit 47f23369e8
4 changed files with 7 additions and 7 deletions

View File

@ -23,7 +23,7 @@
#include "world.hpp"
#include "constants.hpp"
TerrainInfo::TerrainInfo(btVector3 &pos, int frequency)
TerrainInfo::TerrainInfo(const btVector3 &pos, int frequency)
{
m_HoT_frequency = frequency;
m_HoT_counter = frequency;
@ -31,7 +31,7 @@ TerrainInfo::TerrainInfo(btVector3 &pos, int frequency)
update(pos);
}
//-----------------------------------------------------------------------------
void TerrainInfo::update( btVector3& pos)
void TerrainInfo::update(const btVector3& pos)
{
m_HoT_counter++;
if(m_HoT_counter>=m_HoT_frequency)

View File

@ -38,9 +38,9 @@ private:
public:
TerrainInfo(int frequency=1) {m_HoT_frequency=frequency;
m_HoT_counter=frequency; }
TerrainInfo(btVector3 &pos, int frequency=1);
TerrainInfo(const btVector3 &pos, int frequency=1);
virtual ~TerrainInfo() {};
virtual void update(btVector3 &pos);
virtual void update(const btVector3 &pos);
float getHoT() const { return m_HoT; }
const Material* getMaterial() const { return m_material; }
const btVector3& getNormal() const { return m_normal; }

View File

@ -848,7 +848,7 @@ void Track::loadTrack(std::string filename_)
} // loadTrack
//-----------------------------------------------------------------------------
void Track::getMusicInformation(std::vector<std::string>& filenames,
void Track::getMusicInformation(std::vector<std::string>& filenames,
std::vector<MusicInformation const *>& music )
{
for(int i=0; i<(int)filenames.size(); i++)
@ -1346,7 +1346,7 @@ void Track::herring_command (sgVec3 *xyz, char htype, int bNeedHeight )
} // herring_command
// ----------------------------------------------------------------------------
void Track::getTerrainInfo(btVector3 &pos, float *hot, btVector3* normal,
void Track::getTerrainInfo(const btVector3 &pos, float *hot, btVector3* normal,
const Material **material) const
{
btVector3 to_pos(pos);

View File

@ -194,7 +194,7 @@ public:
const std::vector<SGfloat>& getWidth () const {return m_path_width; }
const std::string& getHerringStyle () const {return m_herring_style; }
void getStartCoords (unsigned int pos, sgCoord* coords) const;
void getTerrainInfo(btVector3 &pos, float *hot, btVector3* normal,
void getTerrainInfo(const btVector3 &pos, float *hot, btVector3* normal,
const Material **material) const;
void createPhysicsModel ();
void glVtx (sgVec2 v, float x_offset, float y_offset) const