aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Orbis/user_new.cpp
diff options
context:
space:
mode:
authorLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
committerLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
commit087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch)
tree69454763e73ca764af4e682d3573080b13138a0e /Minecraft.Client/Orbis/user_new.cpp
parenta9be52c41a02d207233199e98898fe7483d7e817 (diff)
Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore functionality of the nightly. All in-game menus do not work and generating a world crashes. This reverts commit a9be52c41a02d207233199e98898fe7483d7e817.
Diffstat (limited to 'Minecraft.Client/Orbis/user_new.cpp')
-rw-r--r--Minecraft.Client/Orbis/user_new.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/Minecraft.Client/Orbis/user_new.cpp b/Minecraft.Client/Orbis/user_new.cpp
index e3108354..83aa3f8c 100644
--- a/Minecraft.Client/Orbis/user_new.cpp
+++ b/Minecraft.Client/Orbis/user_new.cpp
@@ -26,13 +26,13 @@ void *user_new(std::size_t size) throw(std::bad_alloc)
if (size == 0)
size = 1;
- while ((ptr = (void *)std::malloc(size)) == nullptr) {
+ while ((ptr = (void *)std::malloc(size)) == NULL) {
//E Obtain new_handler
//J new_handler を取得する
std::new_handler handler = std::get_new_handler();
- //E When new_handler is a nullptr pointer, bad_alloc is send. If not, new_handler is called.
- //J new_handler が nullptr ポインタの場合、bad_alloc を送出する、そうでない場合、new_handler を呼び出す
+ //E When new_handler is a NULL pointer, bad_alloc is send. If not, new_handler is called.
+ //J new_handler が NULL ポインタの場合、bad_alloc を送出する、そうでない場合、new_handler を呼び出す
if (!handler)
{
assert(0);//throw std::bad_alloc();
@@ -54,27 +54,27 @@ void *user_new(std::size_t size, const std::nothrow_t& x) throw()
// if (size == 0)
// size = 1;
//
-// while ((ptr = (void *)std::malloc(size)) == nullptr) {
+// while ((ptr = (void *)std::malloc(size)) == NULL) {
// //E Obtain new_handler
// //J new_handler を取得する
// std::new_handler handler = std::get_new_handler();
//
-// //E When new_handler is a nullptr pointer, nullptr is returned.
-// //J new_handler が nullptr ポインタの場合、nullptr を返す
+// //E When new_handler is a NULL pointer, NULL is returned.
+// //J new_handler が NULL ポインタの場合、NULL を返す
// if (!handler)
-// return nullptr;
+// return NULL;
//
-// //E Call new_handler. If new_handler sends bad_alloc, nullptr is returned.
-// //J new_handler を呼び出す、new_handler が bad_alloc を送出した場合、nullptr を返す
+// //E Call new_handler. If new_handler sends bad_alloc, NULL is returned.
+// //J new_handler を呼び出す、new_handler が bad_alloc を送出した場合、NULL を返す
// try {
// (*handler)();
// } catch (std::bad_alloc) {
-// return nullptr;
+// return NULL;
// }
// }
// return ptr;
assert(0);
- return nullptr;
+ return NULL;
}
//E Replace operator new[].
@@ -95,9 +95,9 @@ void *user_new_array(std::size_t size, const std::nothrow_t& x) throw()
//J operator delete と置き換わる
void user_delete(void *ptr) throw()
{
- //E In the case of the nullptr pointer, no action will be taken.
- //J nullptr ポインタの場合、何も行わない
- if (ptr != nullptr)
+ //E In the case of the NULL pointer, no action will be taken.
+ //J NULL ポインタの場合、何も行わない
+ if (ptr != NULL)
std::free(ptr);
}