aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/ConnectScreen.cpp
diff options
context:
space:
mode:
authorqwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com>2026-03-16 21:44:26 -0500
committerGitHub <noreply@github.com>2026-03-16 21:44:26 -0500
commitce739f6045ec72127491286ea3f3f21e537c1b55 (patch)
treef33bd42a47c1b4a7b2153a7fb77127ee3b407db9 /Minecraft.Client/ConnectScreen.cpp
parent255a18fe8e9b57377975f82e2b227afe2a12eda0 (diff)
parent5a59f5d146b43811dde6a5a0245ee9875d7b5cd1 (diff)
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.Client/ConnectScreen.cpp')
-rw-r--r--Minecraft.Client/ConnectScreen.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Minecraft.Client/ConnectScreen.cpp b/Minecraft.Client/ConnectScreen.cpp
index 2cf005b6..18d50a52 100644
--- a/Minecraft.Client/ConnectScreen.cpp
+++ b/Minecraft.Client/ConnectScreen.cpp
@@ -12,12 +12,12 @@ ConnectScreen::ConnectScreen(Minecraft *minecraft, const wstring& ip, int port)
{
aborted = false;
// System.out.println("Connecting to " + ip + ", " + port);
- minecraft->setLevel(NULL);
+ minecraft->setLevel(nullptr);
#if 1
// 4J - removed from separate thread, but need to investigate what we actually need here
connection = new ClientConnection(minecraft, ip, port);
if (aborted) return;
- connection->send( shared_ptr<PreLoginPacket>( new PreLoginPacket(minecraft->user->name) ) );
+ connection->send(std::make_shared<PreLoginPacket>(minecraft->user->name));
#else
new Thread() {
@@ -45,7 +45,7 @@ ConnectScreen::ConnectScreen(Minecraft *minecraft, const wstring& ip, int port)
void ConnectScreen::tick()
{
- if (connection != NULL)
+ if (connection != nullptr)
{
connection->tick();
}
@@ -69,7 +69,7 @@ void ConnectScreen::buttonClicked(Button *button)
if (button->id == 0)
{
aborted = true;
- if (connection != NULL) connection->close();
+ if (connection != nullptr) connection->close();
minecraft->setScreen(new TitleScreen());
}
}
@@ -80,7 +80,7 @@ void ConnectScreen::render(int xm, int ym, float a)
Language *language = Language::getInstance();
- if (connection == NULL)
+ if (connection == nullptr)
{
drawCenteredString(font, language->getElement(L"connect.connecting"), width / 2, height / 2 - 50, 0xffffff);
drawCenteredString(font, L"", width / 2, height / 2 - 10, 0xffffff);