aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/UI/UIScene_EndPoem.cpp
diff options
context:
space:
mode:
authorvoid_17 <61356189+void2012@users.noreply.github.com>2026-03-06 02:11:18 +0700
committerGitHub <noreply@github.com>2026-03-06 02:11:18 +0700
commit55231bb8d3e1a4e2752ac3d444c4287eb0ca4e8b (patch)
tree953c537a5c66e328e9f4ab29626cf738112d53c0 /Minecraft.Client/Common/UI/UIScene_EndPoem.cpp
parent7d6658fe5b3095f35093701b5ab669ffc291e875 (diff)
Remove AUTO_VAR macro and _toString function (#592)
Diffstat (limited to 'Minecraft.Client/Common/UI/UIScene_EndPoem.cpp')
-rw-r--r--Minecraft.Client/Common/UI/UIScene_EndPoem.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Minecraft.Client/Common/UI/UIScene_EndPoem.cpp b/Minecraft.Client/Common/UI/UIScene_EndPoem.cpp
index c5a8e61a..2f43cada 100644
--- a/Minecraft.Client/Common/UI/UIScene_EndPoem.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_EndPoem.cpp
@@ -61,13 +61,13 @@ UIScene_EndPoem::UIScene_EndPoem(int iPad, void *initData, UILayer *parentLayer)
noNoiseString = replaceAll(noNoiseString,L"{*PLAYER*}",playerName);
Random random(8124371);
- int found=(int)noNoiseString.find(L"{*NOISE*}");
+ size_t found=noNoiseString.find(L"{*NOISE*}");
int length;
while (found!=string::npos)
{
length = random.nextInt(4) + 3;
m_noiseLengths.push_back(length);
- found=(int)noNoiseString.find(L"{*NOISE*}",found+1);
+ found=noNoiseString.find(L"{*NOISE*}",found+1);
}
updateNoise();
@@ -77,7 +77,7 @@ UIScene_EndPoem::UIScene_EndPoem(int iPad, void *initData, UILayer *parentLayer)
m_paragraphs = vector<wstring>();
int lastIndex = 0;
for ( int index = 0;
- index != wstring::npos;
+ index != wstring::npos;
index = noiseString.find(L"<br /><br />", index+12, 12)
)
{
@@ -198,7 +198,7 @@ void UIScene_EndPoem::updateNoise()
{
Minecraft *pMinecraft = Minecraft::GetInstance();
noiseString = noNoiseString;
-
+
int length = 0;
wchar_t replacements[64];
wstring replaceString = L"";
@@ -209,8 +209,8 @@ void UIScene_EndPoem::updateNoise()
wstring tag = L"{*NOISE*}";
- AUTO_VAR(it, m_noiseLengths.begin());
- int found=(int)noiseString.find(tag);
+ auto it = m_noiseLengths.begin();
+ size_t found= noiseString.find(tag);
while (found!=string::npos && it != m_noiseLengths.end() )
{
length = *it;
@@ -229,7 +229,7 @@ void UIScene_EndPoem::updateNoise()
static wstring acceptableLetters = L"!\"#$%&'()*+,-./0123456789:;<=>?@[\\]^_'|}~";
randomChar = acceptableLetters[ random->nextInt((int)acceptableLetters.length()) ];
}
-
+
wstring randomCharStr = L"";
randomCharStr.push_back(randomChar);
if(randomChar == L'<')
@@ -275,6 +275,6 @@ void UIScene_EndPoem::updateNoise()
//ib.put(listPos + 256 + random->nextInt(2) + 8 + (darken ? 16 : 0));
//ib.put(listPos + pos + 32);
- found=(int)noiseString.find(tag,found+1);
+ found=noiseString.find(tag,found+1);
}
} \ No newline at end of file