Fix code style issues
This commit is contained in:
parent
9ec2ff5c4a
commit
802d70ca8d
@ -35,6 +35,7 @@ Controller::Controller(AbstractKart *kart)
|
||||
setControllerName("Controller");
|
||||
} // Controller
|
||||
|
||||
core::stringw Controller::getName() const {
|
||||
core::stringw Controller::getName() const
|
||||
{
|
||||
return translations->fribidize(m_kart->getName());
|
||||
}
|
||||
|
@ -77,9 +77,10 @@ public:
|
||||
{ return m_current_index; }
|
||||
// ------------------------------------------------------------------------
|
||||
/** Return the display name; if not set, use default display name (kart name) */
|
||||
core::stringw getName() const OVERRIDE { return m_display_name.empty() ?
|
||||
Controller::getName() :
|
||||
m_display_name; }
|
||||
core::stringw getName() const OVERRIDE
|
||||
{
|
||||
return m_display_name.empty() ? Controller::getName() : m_display_name;
|
||||
}
|
||||
}; // GhostController
|
||||
|
||||
#endif
|
||||
|
@ -142,21 +142,23 @@ bool ReplayPlay::addReplayFile(const std::string& fn, bool custom_replay)
|
||||
{
|
||||
Log::warn("Replay", "Could not read ghost karts info!");
|
||||
break;
|
||||
} else {
|
||||
rd.m_kart_list.push_back(std::string(s1));
|
||||
}
|
||||
|
||||
if (scanned == 2) {
|
||||
// If username of kart is present, use it
|
||||
rd.m_name_list.push_back(StringUtils::xmlDecode(std::string(display_name_encoded)));
|
||||
if (rd.m_name_list.size() == 1) {
|
||||
// First user is the game master and the "owner" of this replay file
|
||||
rd.m_user_name = rd.m_name_list[0];
|
||||
}
|
||||
} else { // scanned == 1
|
||||
// If username is not present, kart display name will default to kart name
|
||||
// (see GhostController::getName)
|
||||
rd.m_name_list.push_back("");
|
||||
rd.m_kart_list.push_back(std::string(s1));
|
||||
if (scanned == 2)
|
||||
{
|
||||
// If username of kart is present, use it
|
||||
rd.m_name_list.push_back(StringUtils::xmlDecode(std::string(display_name_encoded)));
|
||||
if (rd.m_name_list.size() == 1)
|
||||
{
|
||||
// First user is the game master and the "owner" of this replay file
|
||||
rd.m_user_name = rd.m_name_list[0];
|
||||
}
|
||||
} else
|
||||
{ // scanned == 1
|
||||
// If username is not present, kart display name will default to kart name
|
||||
// (see GhostController::getName)
|
||||
rd.m_name_list.push_back("");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user