diff --git a/src/achievements/achievements_status.cpp b/src/achievements/achievements_status.cpp index 400f9a6cd..af15e780b 100644 --- a/src/achievements/achievements_status.cpp +++ b/src/achievements/achievements_status.cpp @@ -114,7 +114,7 @@ Achievement * AchievementsStatus::getAchievement(uint32_t id) // ---------------------------------------------------------------------------- /** Synchronises the achievements between local and online usage. It takes - * the list of online achievements, and marks them all to be achieved + * the list of online achievements, and marks them all to be achieved * locally. Then it issues 'achieved' requests to the server for all local * achievements that are not set online. */ diff --git a/src/guiengine/message_queue.cpp b/src/guiengine/message_queue.cpp index 3ae0d671f..8d43ff227 100755 --- a/src/guiengine/message_queue.cpp +++ b/src/guiengine/message_queue.cpp @@ -87,7 +87,7 @@ public: // ============================================================================ /** List of all messages. */ -std::priority_queue, +std::priority_queue, CompareMessages> g_all_messages; /** How long the current message has been displayed. The special value @@ -139,7 +139,7 @@ void add(MessageType mt, const irr::core::stringw &message) } // add // ---------------------------------------------------------------------------- -/** Update function called from the GUIEngine to handle displaying of the +/** Update function called from the GUIEngine to handle displaying of the * messages. It will make sure that each message is shown for a certain * amount of time, before it is discarded and the next message (if any) * is displayed. @@ -166,7 +166,7 @@ void update(float dt) } Message *current = g_all_messages.top(); - GUIEngine::getSkin()->drawMessage(g_container, g_area, + GUIEngine::getSkin()->drawMessage(g_container, g_area, current->getRenderType()); gui::ScalableFont *font = GUIEngine::getFont(); diff --git a/src/online/http_request.cpp b/src/online/http_request.cpp index a29a9384d..6b24f7f1b 100644 --- a/src/online/http_request.cpp +++ b/src/online/http_request.cpp @@ -322,7 +322,7 @@ namespace Online // Check if we are asked to abort the download. If so, signal this // back to libcurl by returning a non-zero status. - if( (request_manager->getAbort() || request->isCancelled()) && + if( (request_manager->getAbort() || request->isCancelled()) && request->isAbortable() ) { // Indicates to abort the current download, which means that this diff --git a/src/online/online_player_profile.cpp b/src/online/online_player_profile.cpp index 16506f5c7..389805754 100644 --- a/src/online/online_player_profile.cpp +++ b/src/online/online_player_profile.cpp @@ -196,7 +196,7 @@ namespace Online // Even if no achievements were sent, we have to call sync // in order to upload local achievements to the server input->get("achieved", &achieved_string); - std::vector achieved_ids = + std::vector achieved_ids = StringUtils::splitToUInt(achieved_string, ' '); PlayerManager::getCurrentAchievementsStatus()->sync(achieved_ids); m_profile->fetchFriends(); diff --git a/src/online/request_manager.cpp b/src/online/request_manager.cpp index 890b5afd2..f285431bc 100644 --- a/src/online/request_manager.cpp +++ b/src/online/request_manager.cpp @@ -220,7 +220,7 @@ namespace Online } // while // Signal that the request manager can now be deleted. - // We signal this even before cleaning up memory, since there's no + // We signal this even before cleaning up memory, since there's no // need to keep the user waiting for STK to exit. me->setCanBeDeleted(); diff --git a/src/online/request_manager.hpp b/src/online/request_manager.hpp index 91005e186..e6fafc0b2 100644 --- a/src/online/request_manager.hpp +++ b/src/online/request_manager.hpp @@ -67,7 +67,7 @@ namespace Online * manager which might be accessed if a download just finished before the * abort). On executing the quit request, the request manager will set * a flag that it is ready to be deleted (using the CanBeDeleted class). - * The main thread will wait for a certain amount of time for the + * The main thread will wait for a certain amount of time for the * RequestManager to be ready to be deleted (i.e. the sign-out and quit * request have been processes), before deleting the RequestManager. * Typically the RequestManager will finish while the rest of stk is diff --git a/src/physics/physics.cpp b/src/physics/physics.cpp index 73350ca62..b1d9c2c71 100644 --- a/src/physics/physics.cpp +++ b/src/physics/physics.cpp @@ -84,7 +84,7 @@ Physics::~Physics() // ---------------------------------------------------------------------------- /** Adds a kart to the physics engine. - * This adds the rigid body and the vehicle but only if the kart is not + * This adds the rigid body and the vehicle but only if the kart is not * already in the physics world. * \param kart The kart to add. * \param vehicle The raycast vehicle object. diff --git a/src/physics/triangle_mesh.cpp b/src/physics/triangle_mesh.cpp index 4b338388b..f8690b19c 100644 --- a/src/physics/triangle_mesh.cpp +++ b/src/physics/triangle_mesh.cpp @@ -304,7 +304,7 @@ bool TriangleMesh::castRay(const btVector3 &from, const btVector3 &to, btCollisionWorld::ClosestRayResultCallback result(from, to); - /** A special ray result class that stores the index of the triangle + /** A special ray result class that stores the index of the triangle * that was hit. */ class MaterialRayResult : public btCollisionWorld::ClosestRayResultCallback { @@ -351,7 +351,7 @@ bool TriangleMesh::castRay(const btVector3 &from, const btVector3 &to, // the normal of the triangle interpolate the normal at the // hit position based on the three normals of the triangle. if(interpolate_normal) - *normal = getInterpolatedNormal(ray_callback.m_index, + *normal = getInterpolatedNormal(ray_callback.m_index, ray_callback.m_hitPointWorld); else *normal = ray_callback.m_hitNormalWorld; diff --git a/src/states_screens/dialogs/user_info_dialog.cpp b/src/states_screens/dialogs/user_info_dialog.cpp index 71ec898fa..a8350b64c 100644 --- a/src/states_screens/dialogs/user_info_dialog.cpp +++ b/src/states_screens/dialogs/user_info_dialog.cpp @@ -452,7 +452,7 @@ bool UserInfoDialog::onEscapePressed() void UserInfoDialog::onUpdate(float dt) { - if(m_processing) + if(m_processing) m_info_widget->setText(StringUtils::loadingDots(_("Processing")), false); //If we want to open the registration dialog, we need to close this one first diff --git a/src/states_screens/online_profile_achievements.cpp b/src/states_screens/online_profile_achievements.cpp index 07e0c4bb3..f24c691e7 100644 --- a/src/states_screens/online_profile_achievements.cpp +++ b/src/states_screens/online_profile_achievements.cpp @@ -160,8 +160,8 @@ void OnlineProfileAchievements::onUpdate(float delta) if (!m_visiting_profile->isReady()) { // This will display an increasing number of dots while waiting. - m_achievements_list_widget->renameItem("loading", - StringUtils::loadingDots(_("Fetching achievements"))); + m_achievements_list_widget->renameItem("loading", + StringUtils::loadingDots(_("Fetching achievements"))); return; } diff --git a/src/states_screens/online_profile_friends.cpp b/src/states_screens/online_profile_friends.cpp index c925ce85c..d8f42259d 100644 --- a/src/states_screens/online_profile_friends.cpp +++ b/src/states_screens/online_profile_friends.cpp @@ -84,7 +84,7 @@ void OnlineProfileFriends::init() m_visiting_profile->fetchFriends(); m_waiting_for_friends = true; m_friends_list_widget->clear(); - m_friends_list_widget->addItem("loading", + m_friends_list_widget->addItem("loading", StringUtils::loadingDots(_("Fetching friends"))); } // init diff --git a/src/states_screens/online_user_search.cpp b/src/states_screens/online_user_search.cpp index 71bc6ba3b..8095c895d 100644 --- a/src/states_screens/online_user_search.cpp +++ b/src/states_screens/online_user_search.cpp @@ -275,7 +275,7 @@ void OnlineUserSearch::onUpdate(float dt) } else { - m_user_list_widget->renameItem("loading", + m_user_list_widget->renameItem("loading", StringUtils::loadingDots(_("Searching")) ); } } diff --git a/src/states_screens/race_gui.hpp b/src/states_screens/race_gui.hpp index 7c26ea2fe..c96343409 100644 --- a/src/states_screens/race_gui.hpp +++ b/src/states_screens/race_gui.hpp @@ -84,7 +84,7 @@ private: /** Height of the digit font. */ int m_font_height; - /** Animation state: none, getting smaller (old value), + /** Animation state: none, getting smaller (old value), * getting bigger (new number). */ enum AnimationState {AS_NONE, AS_SMALLER, AS_BIGGER}; std::vector m_animation_states; diff --git a/src/states_screens/register_screen.cpp b/src/states_screens/register_screen.cpp index 941943dfa..556ee832c 100644 --- a/src/states_screens/register_screen.cpp +++ b/src/states_screens/register_screen.cpp @@ -89,7 +89,7 @@ void RegisterScreen::init() getWidget("online")->setVisible(true); getWidget("label_online")->setVisible(true); onDialogClose(); - bool online = UserConfigParams::m_internet_status + bool online = UserConfigParams::m_internet_status != Online::RequestManager::IPERM_NOT_ALLOWED; getWidget("online")->setState(online); makeEntryFieldsVisible(online); @@ -108,7 +108,7 @@ void RegisterScreen::setRename(PlayerProfile *player) */ void RegisterScreen::onDialogClose() { - bool online = UserConfigParams::m_internet_status + bool online = UserConfigParams::m_internet_status != Online::RequestManager::IPERM_NOT_ALLOWED; getWidget("online")->setState(online); makeEntryFieldsVisible(online); diff --git a/src/tracks/terrain_info.cpp b/src/tracks/terrain_info.cpp index 64c60eea5..7163cd3c9 100644 --- a/src/tracks/terrain_info.cpp +++ b/src/tracks/terrain_info.cpp @@ -57,7 +57,7 @@ void TerrainInfo::update(const Vec3 &from) to.setY(-10000.0f); const TriangleMesh &tm = World::getWorld()->getTrack()->getTriangleMesh(); - tm.castRay(from, to, &m_hit_point, &m_material, &m_normal, + tm.castRay(from, to, &m_hit_point, &m_material, &m_normal, /*interpolate*/false); } // update //----------------------------------------------------------------------------- diff --git a/src/utils/can_be_deleted.hpp b/src/utils/can_be_deleted.hpp index 2774b1b74..1c0ad3555 100755 --- a/src/utils/can_be_deleted.hpp +++ b/src/utils/can_be_deleted.hpp @@ -54,9 +54,9 @@ public: Log::verbose("Thread", "Start waiting %lf", start); while(1) { - if(m_can_be_deleted.getAtomic()) + if(m_can_be_deleted.getAtomic()) { - Log::verbose("Thread", + Log::verbose("Thread", "Waited %lf seconds for thread to become deleteable.", StkTime::getRealTime()-start); Log::verbose("Thread", "Stop waiting %lf", StkTime::getRealTime()); @@ -67,7 +67,7 @@ public: { Log::verbose("Thread", "Stop waiting %lf", StkTime::getRealTime()); Log::verbose("Thread", "Waited for more than %f seconds for " - "thread to become deleteable", + "thread to become deleteable", waiting_time); return false; } @@ -76,4 +76,4 @@ public: // ------------------------------------------------------------------------ }; // CanBeDeleted -#endif \ No newline at end of file +#endif diff --git a/src/utils/string_utils.cpp b/src/utils/string_utils.cpp index 734dcdce9..a096f88c5 100644 --- a/src/utils/string_utils.cpp +++ b/src/utils/string_utils.cpp @@ -531,9 +531,9 @@ namespace StringUtils */ irr::core::stringw loadingDots(float interval, int max_dots) { - int nr_dots = int(floor(StkTime::getRealTime() / interval)) + int nr_dots = int(floor(StkTime::getRealTime() / interval)) % (max_dots + 1); - return irr::core::stringw((std::string(nr_dots, '.') + + return irr::core::stringw((std::string(nr_dots, '.') + std::string(max_dots - nr_dots, ' ')).c_str()); } // loadingDots