aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2022-01-14 09:49:23 +0100
committerMartin Ridgers <[email protected]>2022-01-14 09:50:44 +0100
commiteb9252a2ab0952e4065436046caf5035a7c68cf8 (patch)
tree6d8249393cdf2528fc4687eed570318ac60ebc27
parentDisabled Sentry on Arm as vcpkg does not support it (diff)
downloadzen-eb9252a2ab0952e4065436046caf5035a7c68cf8.tar.xz
zen-eb9252a2ab0952e4065436046caf5035a7c68cf8.zip
Fixed up compile errors if mimalloc use is disabled
-rw-r--r--xmake.lua2
-rw-r--r--zen/zen.cpp6
-rw-r--r--zencore/iobuffer.cpp1
3 files changed, 7 insertions, 2 deletions
diff --git a/xmake.lua b/xmake.lua
index 6c5ee63b3..cf868291a 100644
--- a/xmake.lua
+++ b/xmake.lua
@@ -13,7 +13,6 @@ add_requires(
"vcpkg::json11",
"vcpkg::lua",
"vcpkg::lz4",
- "vcpkg::mimalloc",
"vcpkg::openssl",
"vcpkg::robin-map",
"vcpkg::sol2",
@@ -25,6 +24,7 @@ add_requires(
if not is_arch("arm64") then
add_requires(
+ "vcpkg::mimalloc",
"vcpkg::sentry-native"
)
end
diff --git a/zen/zen.cpp b/zen/zen.cpp
index 4cbf75c18..7f547a77a 100644
--- a/zen/zen.cpp
+++ b/zen/zen.cpp
@@ -28,7 +28,9 @@
#include <gsl/gsl-lite.hpp>
-#include <mimalloc-new-delete.h>
+#if ZEN_USE_MIMALLOC
+# include <mimalloc-new-delete.h>
+#endif
//////////////////////////////////////////////////////////////////////////
@@ -96,7 +98,9 @@ main(int argc, char** argv)
{
using namespace zen;
+#if ZEN_USE_MIMALLOC
mi_version();
+#endif
zen::logging::InitializeLogging();
diff --git a/zencore/iobuffer.cpp b/zencore/iobuffer.cpp
index b6bbedc40..e4c1ad75a 100644
--- a/zencore/iobuffer.cpp
+++ b/zencore/iobuffer.cpp
@@ -83,6 +83,7 @@ IoBufferCore::FreeBuffer()
}
#endif
+ ZEN_UNUSED(LocalFlags);
return Memory::Free(const_cast<void*>(m_DataPtr));
}