vmtester: Small refactoring

This commit is contained in:
Paweł Bylica 2019-11-27 00:36:46 +01:00
parent f2aa41df66
commit 13aabfdd71
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
1 changed files with 2 additions and 5 deletions

View File

@ -13,19 +13,16 @@
namespace namespace
{ {
// NOTE: this is to avoid compiler optimisations when reading the buffer // NOTE: this is to avoid compiler optimisations when reading the buffer
uint8_t read_uint8(const volatile uint8_t* p) uint8_t read_uint8(const volatile uint8_t* p) noexcept
{ {
return *p; return *p;
} }
void read_buffer(const uint8_t* ptr, size_t size) void read_buffer(const uint8_t* ptr, size_t size) noexcept
{ {
for (size_t i = 0; i < size; i++) for (size_t i = 0; i < size; i++)
{
read_uint8(&ptr[i]); read_uint8(&ptr[i]);
}
} }
} // namespace } // namespace
TEST_F(evmc_vm_test, abi_version_match) TEST_F(evmc_vm_test, abi_version_match)