aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2024-08-07 16:11:05 +0200
committerGitHub Enterprise <[email protected]>2024-08-07 16:11:05 +0200
commitec92226cd5df3ac4a45b21ae126115cac2d44a5b (patch)
treee9f65fff1839940bf28eea6a9e5158635f092496 /src
parentadd gc single threaded option (#104) (diff)
downloadzen-ec92226cd5df3ac4a45b21ae126115cac2d44a5b.tar.xz
zen-ec92226cd5df3ac4a45b21ae126115cac2d44a5b.zip
fix compilation issue with recent VS toolchains (#103)
Diffstat (limited to 'src')
-rw-r--r--src/zencore/include/zencore/memory.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zencore/include/zencore/memory.h b/src/zencore/include/zencore/memory.h
index 6965b76b1..6419252ff 100644
--- a/src/zencore/include/zencore/memory.h
+++ b/src/zencore/include/zencore/memory.h
@@ -356,7 +356,7 @@ template<ContiguousRange R>
MakeMemoryView(const R& Container)
{
std::span Span = Container;
- return MemoryView(Span.data(), Span.size() * sizeof(typename decltype(Span)::element_type));
+ return MemoryView(Span.data(), Span.size_bytes());
}
/** Make a non-owning const view starting at Data and ending at DataEnd. */
@@ -391,7 +391,7 @@ template<ContiguousRange R>
MakeMutableMemoryView(R& Container)
{
std::span Span = Container;
- return MutableMemoryView(Span.data(), Span.size() * sizeof(typename decltype(Span)::element_type));
+ return MutableMemoryView(Span.data(), Span.size_bytes());
}
/** Make a non-owning mutable view starting at Data and ending at DataEnd. */