aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/ConsoleSaveFileOutputStream.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.World/ConsoleSaveFileOutputStream.cpp
parent255a18fe8e9b57377975f82e2b227afe2a12eda0 (diff)
parent5a59f5d146b43811dde6a5a0245ee9875d7b5cd1 (diff)
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.World/ConsoleSaveFileOutputStream.cpp')
-rw-r--r--Minecraft.World/ConsoleSaveFileOutputStream.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Minecraft.World/ConsoleSaveFileOutputStream.cpp b/Minecraft.World/ConsoleSaveFileOutputStream.cpp
index 3d8bb3f7..8d05ee60 100644
--- a/Minecraft.World/ConsoleSaveFileOutputStream.cpp
+++ b/Minecraft.World/ConsoleSaveFileOutputStream.cpp
@@ -19,7 +19,7 @@ ConsoleSaveFileOutputStream::ConsoleSaveFileOutputStream(ConsoleSaveFile *saveFi
m_file = m_saveFile->createFile(file);
- m_saveFile->setFilePointer( m_file, 0, NULL, FILE_BEGIN );
+ m_saveFile->setFilePointer( m_file, 0, nullptr, FILE_BEGIN );
}
ConsoleSaveFileOutputStream::ConsoleSaveFileOutputStream(ConsoleSaveFile *saveFile, FileEntry *file)
@@ -28,7 +28,7 @@ ConsoleSaveFileOutputStream::ConsoleSaveFileOutputStream(ConsoleSaveFile *saveFi
m_file = file;
- m_saveFile->setFilePointer( m_file, 0, NULL, FILE_BEGIN );
+ m_saveFile->setFilePointer( m_file, 0, nullptr, FILE_BEGIN );
}
//Writes the specified byte to this file output stream. Implements the write method of OutputStream.
@@ -38,7 +38,7 @@ void ConsoleSaveFileOutputStream::write(unsigned int b)
{
DWORD numberOfBytesWritten;
- byte value = (byte) b;
+ byte value = static_cast<byte>(b);
BOOL result = m_saveFile->writeFile(
m_file,
@@ -66,7 +66,7 @@ void ConsoleSaveFileOutputStream::write(byteArray b)
BOOL result = m_saveFile->writeFile(
m_file,
- &b.data, // data buffer
+ b.data, // data buffer
b.length, // number of bytes to write
&numberOfBytesWritten // number of bytes written
);
@@ -115,7 +115,7 @@ void ConsoleSaveFileOutputStream::write(byteArray b, unsigned int offset, unsign
//If this stream has an associated channel then the channel is closed as well.
void ConsoleSaveFileOutputStream::close()
{
- if( m_saveFile != NULL )
+ if( m_saveFile != nullptr )
{
BOOL result = m_saveFile->closeHandle( m_file );
@@ -125,6 +125,6 @@ void ConsoleSaveFileOutputStream::close()
}
// Stop the dtor from trying to close it again
- m_saveFile = NULL;
+ m_saveFile = nullptr;
}
}