mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-07-18 22:28:28 +00:00
refactor: replace NULL with nullptr across C++ codebase
Excludes vendored C libs (zlib, Miles, DirectXMath, boost, Iggy).
This commit is contained in:
@@ -11,7 +11,7 @@ ConnectScreen::ConnectScreen(Minecraft* minecraft, const std::wstring& ip,
|
||||
int port) {
|
||||
aborted = false;
|
||||
// System.out.println("Connecting to " + ip + ", " + port);
|
||||
minecraft->setLevel(NULL);
|
||||
minecraft->setLevel(nullptr);
|
||||
// 4J - removed from separate thread, but need to investigate what we
|
||||
// actually need here
|
||||
connection = new ClientConnection(minecraft, ip, port);
|
||||
@@ -21,7 +21,7 @@ ConnectScreen::ConnectScreen(Minecraft* minecraft, const std::wstring& ip,
|
||||
}
|
||||
|
||||
void ConnectScreen::tick() {
|
||||
if (connection != NULL) {
|
||||
if (connection != nullptr) {
|
||||
connection->tick();
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ void ConnectScreen::init() {
|
||||
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());
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,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);
|
||||
|
||||
Reference in New Issue
Block a user