From 540c5826d8167124725ba2d12a90465295077b01 Mon Sep 17 00:00:00 2001 From: Reece Date: Sat, 2 Oct 2021 15:05:35 +0100 Subject: [PATCH] [*] ...linux --- Include/Aurora/Async/Async.hpp | 4 ++-- Include/Aurora/Memory/Memory.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Include/Aurora/Async/Async.hpp b/Include/Aurora/Async/Async.hpp index a3573236..505aafd3 100644 --- a/Include/Aurora/Async/Async.hpp +++ b/Include/Aurora/Async/Async.hpp @@ -516,7 +516,7 @@ namespace Aurora::Async } }; - #define ASYNC_ERROR(exp) if constexpr (std::is_same_v) { SysPushErrorGen(exp); return {}; } else { throw std::exception(exp); } + #define ASYNC_ERROR(exp) if constexpr (std::is_same_v) { SysPushErrorGen(exp); return {}; } else { throw std::string(exp); } #define ASYNC_FINISH if constexpr (std::is_same_v) { return true; } template || std::is_void::value)> @@ -548,7 +548,7 @@ namespace Aurora::Async { auto work = AuMakeShared>(); if (!work) ASYNC_ERROR("can't dispatch async call; out of memory"); - work.task.onProcess = [](const AVoid &) -> AuOptional + work.task.onProcess = [=](const AVoid &) -> AuOptional { return func(in...); }; diff --git a/Include/Aurora/Memory/Memory.hpp b/Include/Aurora/Memory/Memory.hpp index ac62a18a..78ffa98f 100644 --- a/Include/Aurora/Memory/Memory.hpp +++ b/Include/Aurora/Memory/Memory.hpp @@ -53,14 +53,14 @@ namespace Aurora::Memory T *NewArray(Types::size_t count) { static_assert(!std::is_class::value, "Do not use heap/kmem apis with classes"); - return FAlloc(count * sizeof(T)); + return reinterpret_cast(_FAlloc(count * sizeof(T))); } template T *NewArray(Types::size_t count, Types::size_t align) { static_assert(!std::is_class::value, "Do not use heap/kmem apis with classes"); - return FAlloc(count * sizeof(T), align); + return reinterpret_cast(_FAlloc(count * sizeof(T)), align); } template