mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Use sizeof
instead of constant
This commit is contained in:
parent
d5594d8bd6
commit
d9b0304adb
|
@ -455,7 +455,7 @@ void CMapImages::UpdateEntityLayerText(void *pTexBuffer, int ImageColorChannelCo
|
|||
if(MaxNumber == -1)
|
||||
MaxNumber = CurrentNumber * 10 - 1;
|
||||
|
||||
str_format(aBuf, 4, "%d", CurrentNumber);
|
||||
str_format(aBuf, sizeof(aBuf), "%d", CurrentNumber);
|
||||
|
||||
int CurrentNumberSuitableFontSize = TextRender()->AdjustFontSize(aBuf, DigitsCount, TextureSize, MaxWidth);
|
||||
int UniversalSuitableFontSize = CurrentNumberSuitableFontSize * 0.92f; // should be smoothed enough to fit any digits combination
|
||||
|
@ -464,7 +464,7 @@ void CMapImages::UpdateEntityLayerText(void *pTexBuffer, int ImageColorChannelCo
|
|||
|
||||
for(; CurrentNumber <= MaxNumber; ++CurrentNumber)
|
||||
{
|
||||
str_format(aBuf, 4, "%d", CurrentNumber);
|
||||
str_format(aBuf, sizeof(aBuf), "%d", CurrentNumber);
|
||||
|
||||
float x = (CurrentNumber % 16) * 64;
|
||||
float y = (CurrentNumber / 16) * 64;
|
||||
|
|
Loading…
Reference in a new issue