diff options
author | Mattes D <github@xoft.cz> | 2014-08-27 14:13:13 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-08-27 14:13:13 +0200 |
commit | d8527c5429aa7ecaa31cc78c8c2fd3833d59266d (patch) | |
tree | a93024b9ccce048a37f60c69349513c2ef29a8a7 | |
parent | CheckBasicStyle: Relaxed the "space after comma". (diff) | |
download | cuberite-d8527c5429aa7ecaa31cc78c8c2fd3833d59266d.tar cuberite-d8527c5429aa7ecaa31cc78c8c2fd3833d59266d.tar.gz cuberite-d8527c5429aa7ecaa31cc78c8c2fd3833d59266d.tar.bz2 cuberite-d8527c5429aa7ecaa31cc78c8c2fd3833d59266d.tar.lz cuberite-d8527c5429aa7ecaa31cc78c8c2fd3833d59266d.tar.xz cuberite-d8527c5429aa7ecaa31cc78c8c2fd3833d59266d.tar.zst cuberite-d8527c5429aa7ecaa31cc78c8c2fd3833d59266d.zip |
-rw-r--r-- | src/LoggerListeners.cpp | 14 | ||||
-rw-r--r-- | src/RankManager.cpp | 10 |
2 files changed, 11 insertions, 13 deletions
diff --git a/src/LoggerListeners.cpp b/src/LoggerListeners.cpp index 836536cbd..77e2aaf67 100644 --- a/src/LoggerListeners.cpp +++ b/src/LoggerListeners.cpp @@ -65,7 +65,7 @@ { case cLogger::llRegular: { - // Gray on black + // Gray on black Attrib = FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED; break; } @@ -93,7 +93,7 @@ virtual void SetDefaultLogColour() override - { + { SetConsoleTextAttribute(m_Console, m_DefaultConsoleAttrib); } @@ -119,13 +119,13 @@ { case cLogger::llRegular: { - // Whatever the console default is + // Whatever the console default is printf("\x1b[0m"); - break; + break; } case cLogger::llInfo: { - // Yellow on black + // Yellow on black printf("\x1b[33;1m"); break; } @@ -133,7 +133,7 @@ { // Red on black printf("\x1b[31;1m"); - break; + break; } case cLogger::llError: { @@ -147,7 +147,7 @@ virtual void SetDefaultLogColour() override { - // Whatever the console default is + // Whatever the console default is printf("\x1b[0m"); } }; diff --git a/src/RankManager.cpp b/src/RankManager.cpp index 65ce33b92..dc6eec9e4 100644 --- a/src/RankManager.cpp +++ b/src/RankManager.cpp @@ -125,7 +125,7 @@ protected: /** Maps lists of groups to rank names. Each group list is either a simple "<Group>" if there's only one group, - or "<PrimaryGroup>,<FirstSecondaryGroup>,<SecondSecondaryGroup>...", where the secondary groups are + or "<PrimaryGroup>, <FirstSecondaryGroup>, <SecondSecondaryGroup>...", where the secondary groups are lowercased and alpha-sorted. This makes the group lists comparable for equivalence, simply by comparing their string names. The ranks are named "<Group>" for single-group players, and "AutoMigratedRank_N" for the composite ranks, @@ -507,10 +507,8 @@ AStringVector cRankManager::GetPlayerGroups(const AString & a_PlayerUUID) // Prepare the DB statement: SQLite::Statement stmt(m_DB, "SELECT PermGroup.Name FROM PermGroup " - "LEFT JOIN RankPermGroup " - "ON PermGroup.PermGroupID = RankPermGroup.PermGroupID " - "LEFT JOIN PlayerRank " - "ON PlayerRank.RankID = RankPermGroup.RankID " + "LEFT JOIN RankPermGroup ON PermGroup.PermGroupID = RankPermGroup.PermGroupID " + "LEFT JOIN PlayerRank ON PlayerRank.RankID = RankPermGroup.RankID " "WHERE PlayerRank.PlayerUUID = ?" ); stmt.bind(1, a_PlayerUUID); @@ -1473,7 +1471,7 @@ void cRankManager::RemovePlayerRank(const AString & a_PlayerUUID) stmt.bind(1, a_PlayerUUID); stmt.exec(); } - catch(const SQLite::Exception & ex) + catch (const SQLite::Exception & ex) { LOGWARNING("%s: Failed to remove rank from player UUID %s: %s", __FUNCTION__, a_PlayerUUID.c_str(), ex.what() |