Skip to content

Commit

Permalink
Merge pull request ddnet#8976 from dobrykafe/pr-align-separators
Browse files Browse the repository at this point in the history
Better alignment of upper and lower separators
  • Loading branch information
def- committed Sep 17, 2024
2 parents 217103a + 9d7b476 commit 60624d5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/game/server/scoreworker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ bool CScoreWorker::ShowTop(IDbConnection *pSqlServer, const ISqlData *pGameData,

if(!g_Config.m_SvRegionalRankings)
{
str_copy(pResult->m_Data.m_aaMessages[Line], "----------------------------------------", sizeof(pResult->m_Data.m_aaMessages[Line]));
str_copy(pResult->m_Data.m_aaMessages[Line], "-----------------------------------------", sizeof(pResult->m_Data.m_aaMessages[Line]));
return !End;
}

Expand Down Expand Up @@ -1146,7 +1146,7 @@ bool CScoreWorker::ShowTeamTop5(IDbConnection *pSqlServer, const ISqlData *pGame
}
}

str_copy(paMessages[Line], "-------------------------------", sizeof(paMessages[Line]));
str_copy(paMessages[Line], "---------------------------------", sizeof(paMessages[Line]));
return false;
}

Expand Down Expand Up @@ -1230,7 +1230,7 @@ bool CScoreWorker::ShowPlayerTeamTop5(IDbConnection *pSqlServer, const ISqlData
break;
}
}
str_copy(paMessages[Line], "-------------------------------", sizeof(paMessages[Line]));
str_copy(paMessages[Line], "---------------------------------", sizeof(paMessages[Line]));
}
else
{
Expand Down Expand Up @@ -1352,7 +1352,7 @@ bool CScoreWorker::ShowTimes(IDbConnection *pSqlServer, const ISqlData *pGameDat
{
return true;
}
str_copy(paMessages[Line], "----------------------------------------------------", sizeof(paMessages[Line]));
str_copy(paMessages[Line], "-------------------------------------------", sizeof(paMessages[Line]));

return false;
}
Expand Down
12 changes: 6 additions & 6 deletions src/test/score.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ TEST_P(SingleScore, Top)
ExpectLines(m_pPlayerResult,
{"------------ Global Top ------------",
"1. nameless tee Time: 01:40.00",
"----------------------------------------"});
"-----------------------------------------"});
}

TEST_P(SingleScore, RankRegional)
Expand Down Expand Up @@ -197,7 +197,7 @@ TEST_P(SingleScore, TopServer)
ExpectLines(m_pPlayerResult,
{"------------ Global Top ------------",
"1. nameless tee Time: 01:40.00",
"----------------------------------------"});
"-----------------------------------------"});
}

TEST_P(SingleScore, RankServerRegional)
Expand Down Expand Up @@ -264,7 +264,7 @@ TEST_P(SingleScore, TimesExists)

str_copy(aBuf, m_pPlayerResult->m_Data.m_aaMessages[1] + str_length(m_pPlayerResult->m_Data.m_aaMessages[1]) - 10, 11);
EXPECT_STREQ(aBuf, ", 01:40.00");
EXPECT_STREQ(m_pPlayerResult->m_Data.m_aaMessages[2], "----------------------------------------------------");
EXPECT_STREQ(m_pPlayerResult->m_Data.m_aaMessages[2], "-------------------------------------------");
for(int i = 3; i < CScorePlayerResult::MAX_MESSAGES; i++)
{
EXPECT_STREQ(m_pPlayerResult->m_Data.m_aaMessages[i], "");
Expand Down Expand Up @@ -321,7 +321,7 @@ TEST_P(TeamScore, All)
ExpectLines(m_pPlayerResult,
{"------- Team Top 5 -------",
"1. brainless tee & nameless tee Team Time: 01:40.00",
"-------------------------------"});
"---------------------------------"});
}

TEST_P(TeamScore, PlayerExists)
Expand All @@ -331,7 +331,7 @@ TEST_P(TeamScore, PlayerExists)
ExpectLines(m_pPlayerResult,
{"------- Team Top 5 -------",
"1. brainless tee & nameless tee Team Time: 01:40.00",
"-------------------------------"});
"---------------------------------"});
}

TEST_P(TeamScore, PlayerDoesntExist)
Expand All @@ -349,7 +349,7 @@ TEST_P(TeamScore, RankUpdates)
ExpectLines(m_pPlayerResult,
{"------- Team Top 5 -------",
"1. brainless tee & nameless tee Team Time: 01:38.00",
"-------------------------------"});
"---------------------------------"});
}

struct MapInfo : public Score
Expand Down

0 comments on commit 60624d5

Please sign in to comment.