summaryrefslogtreecommitdiffstats
path: root/source/compiler-core
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler-core')
-rw-r--r--source/compiler-core/slang-json-value.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/compiler-core/slang-json-value.cpp b/source/compiler-core/slang-json-value.cpp
index ae38bd086..56d003737 100644
--- a/source/compiler-core/slang-json-value.cpp
+++ b/source/compiler-core/slang-json-value.cpp
@@ -869,8 +869,8 @@ void JSONContainer::_removeKey(JSONValue& obj, Index globalIndex)
{
auto localBuf = m_objectValues.getBuffer() + range.startIndex;
::memmove(
- localBuf + localIndex,
- localBuf + localIndex + 1,
+ (void*)(localBuf + localIndex),
+ (void*)(localBuf + localIndex + 1),
sizeof(*localBuf) * (range.count - (localIndex + 1)));
}
@@ -925,7 +925,10 @@ template<typename T>
ioList.growToCount(newStartIndex + ioRange.count + 1);
auto buffer = ioList.getBuffer();
- ::memmove(buffer + newStartIndex, buffer + ioRange.startIndex, sizeof(*buffer) * ioRange.count);
+ ::memmove(
+ (void*)(buffer + newStartIndex),
+ (void*)(buffer + ioRange.startIndex),
+ sizeof(*buffer) * ioRange.count);
buffer[newStartIndex + ioRange.count] = value;