summaryrefslogtreecommitdiffstats
path: root/src/Noise
diff options
context:
space:
mode:
authorPeter Bell <peterbell10@live.co.uk>2020-05-09 17:51:54 +0200
committerpeterbell10 <peterbell10@live.co.uk>2020-05-09 21:37:16 +0200
commit1123c95cf2efdcb23ff557b956d58538ca24aefe (patch)
treee8f39c2519ad06afc4f52d8fbc1d8fb334aeea42 /src/Noise
parentUpdate submodules (#4727) (diff)
downloadcuberite-1123c95cf2efdcb23ff557b956d58538ca24aefe.tar
cuberite-1123c95cf2efdcb23ff557b956d58538ca24aefe.tar.gz
cuberite-1123c95cf2efdcb23ff557b956d58538ca24aefe.tar.bz2
cuberite-1123c95cf2efdcb23ff557b956d58538ca24aefe.tar.lz
cuberite-1123c95cf2efdcb23ff557b956d58538ca24aefe.tar.xz
cuberite-1123c95cf2efdcb23ff557b956d58538ca24aefe.tar.zst
cuberite-1123c95cf2efdcb23ff557b956d58538ca24aefe.zip
Diffstat (limited to '')
-rw-r--r--src/Noise/OctavedNoise.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Noise/OctavedNoise.h b/src/Noise/OctavedNoise.h
index 6dd79365f..b9f3d132e 100644
--- a/src/Noise/OctavedNoise.h
+++ b/src/Noise/OctavedNoise.h
@@ -61,7 +61,7 @@ public:
std::unique_ptr<NOISE_DATATYPE[]> workspaceHeap;
if (a_Workspace == nullptr)
{
- workspaceHeap.reset(new NOISE_DATATYPE[a_SizeX * a_SizeY]);
+ workspaceHeap.reset(new NOISE_DATATYPE[ToUnsigned(a_SizeX * a_SizeY)]);
a_Workspace = workspaceHeap.get();
}
@@ -121,7 +121,7 @@ public:
std::unique_ptr<NOISE_DATATYPE[]> workspaceHeap;
if (a_Workspace == nullptr)
{
- workspaceHeap.reset(new NOISE_DATATYPE[a_SizeX * a_SizeY * a_SizeZ]);
+ workspaceHeap.reset(new NOISE_DATATYPE[ToUnsigned(a_SizeX * a_SizeY * a_SizeZ)]);
a_Workspace = workspaceHeap.get();
}