Changed some const char* to const std::string& .

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1951 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2008-05-20 01:24:15 +00:00
parent 01391b26fc
commit c6f377413d
7 changed files with 11 additions and 11 deletions

View File

@ -118,9 +118,9 @@ public:
Material* getIconMaterial () const {return m_icon_material; }
ssgEntity* getModel () const {return m_model; }
const std::string& getName () const {return m_name; }
const char* getIdent () const {return m_ident.c_str(); }
const char* getShadowFile () const {return m_shadow_file.c_str(); }
const char* getIconFile () const {return m_icon_file.c_str(); }
const std::string& getIdent () const {return m_ident; }
const std::string& getShadowFile () const {return m_shadow_file; }
const std::string& getIconFile () const {return m_icon_file; }
const sgVec3* getColor () const {return &m_color; }
float getMass () const {return m_mass; }
float getKartLength () const {return m_kart_length; }

View File

@ -238,7 +238,7 @@ int handleCmdLine(int argc, char **argv)
for (unsigned int i = 0; NULL != kart_properties_manager->getKartById(i); i++)
{
const KartProperties* KP= kart_properties_manager->getKartById(i);
fprintf (stdout, "\t%10s: %s\n", KP->getIdent(), KP->getName().c_str());
fprintf (stdout, "\t%10s: %s\n", KP->getIdent().c_str(), KP->getName().c_str());
}
fprintf ( stdout, "\n" );

View File

@ -250,7 +250,7 @@ void Widget::setFont( const WidgetFont FONT )
}
//-----------------------------------------------------------------------------
void Widget::setTexture( const char* FILENAME, bool is_full_path )
void Widget::setTexture( const std::string& FILENAME, bool is_full_path )
{
Material *m = material_manager->getMaterial( FILENAME, is_full_path );
m_texture = m->getState()->getTextureHandle();

View File

@ -205,7 +205,7 @@ class Widget
void darkenColor();
void setFont( const WidgetFont FONT );
void setTexture( const char* FILENAME, const bool is_full_path=true );
void setTexture( const std::string& FILENAME, const bool is_full_path=true );
/* Functions created simply to organize the code */
bool createRect();

View File

@ -1047,7 +1047,7 @@ bool WidgetManager::addImgButtonWgt
const int TOKEN,
const int MIN_WIDTH,
const int MIN_HEIGHT,
const char* FILENAME
const std::string& FILENAME
)
{
if( !( addWgt( TOKEN, MIN_WIDTH, MIN_HEIGHT ))) return false;
@ -1376,7 +1376,7 @@ void WidgetManager::setWgtTexture(const int TOKEN, const int TEXTURE)
}
//-----------------------------------------------------------------------------
void WidgetManager::setWgtTexture(const int TOKEN, const char* FILENAME,
void WidgetManager::setWgtTexture(const int TOKEN, const std::string& FILENAME,
const bool is_full_path)
{
const int ID = findId(TOKEN);

View File

@ -271,7 +271,7 @@ public:
const int TOKEN,
const int MIN_WIDTH,
const int MIN_HEIGHT,
const char* FILENAME
const std::string& FILENAME
);
/* On/off widget switch features. They are all disabled/hidden initially. */
@ -349,7 +349,7 @@ public:
//TODO: add initial border colors, if I don't erase those functions.
void setWgtTexture(const int TOKEN, const int TEXTURE);
void setWgtTexture(const int TOKEN, const char* FILENAME, const bool is_full_path=true);
void setWgtTexture(const int TOKEN, const std::string& FILENAME, const bool is_full_path=true);
void showWgtTexture(const int TOKEN);
void hideWgtTexture(const int TOKEN);