Commit b8778630 authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

cppcheck fixes

parent dcbf6ddc
...@@ -41,6 +41,9 @@ class MemoryBlock { ...@@ -41,6 +41,9 @@ class MemoryBlock {
public: public:
using deallocator_fn = std::function<void(MemoryBlock*)>; using deallocator_fn = std::function<void(MemoryBlock*)>;
using Ptr = std::shared_ptr<MemoryBlock>;
// cppcheck-suppress passedByValue
MemoryBlock(size_t offset, size_t size, MemoryManager::AddressSpaceId addrSpaceId) : MemoryBlock(size_t offset, size_t size, MemoryManager::AddressSpaceId addrSpaceId) :
offset(offset), size(size), addrSpaceId(addrSpaceId) {} offset(offset), size(size), addrSpaceId(addrSpaceId) {}
......
...@@ -230,8 +230,8 @@ public: ...@@ -230,8 +230,8 @@ public:
MemoryTranslation MemoryTranslation
getTranslation(AddressSpaceId fromAddrSpaceId, AddressSpaceId toAddrSpaceId); getTranslation(AddressSpaceId fromAddrSpaceId, AddressSpaceId toAddrSpaceId);
MemoryTranslation // cppcheck-suppress passedByValue
getTranslationFromProcess(AddressSpaceId foreignAddrSpaceId) MemoryTranslation getTranslationFromProcess(AddressSpaceId foreignAddrSpaceId)
{ return getTranslation(getProcessAddressSpace(), foreignAddrSpaceId); } { return getTranslation(getProcessAddressSpace(), foreignAddrSpaceId); }
static std::string static std::string
......
...@@ -70,7 +70,7 @@ HostRam::HostRamAllocator::allocateBlock(size_t size) ...@@ -70,7 +70,7 @@ HostRam::HostRamAllocator::allocateBlock(size_t size)
return mem; return mem;
} }
// cppcheck-suppress passedByValue
LinearAllocator::LinearAllocator(MemoryManager::AddressSpaceId memoryAddrSpaceId, LinearAllocator::LinearAllocator(MemoryManager::AddressSpaceId memoryAddrSpaceId,
size_t memorySize, size_t memorySize,
size_t internalOffset) : size_t internalOffset) :
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment