Clang format

This commit is contained in:
Matthew Parkinson
2019-01-24 11:21:52 +00:00
parent 294efe8e03
commit d5fb7150a3
2 changed files with 9 additions and 8 deletions

View File

@@ -32,17 +32,17 @@ namespace snmalloc
}
};
/**
/**
* Wrapper for wrapping values.
*
* Wraps on read. This allows code to trust the value is in range, even when
* there is a memory corruption.
*
* Wraps on read. This allows code to trust the value is in range, even when
* there is a memory corruption.
**/
template<size_t length, typename T>
class Mod
{
static_assert(length == bits::next_pow2_const(length),
"Must be a power of two.");
static_assert(
length == bits::next_pow2_const(length), "Must be a power of two.");
private:
T value;

View File

@@ -1,8 +1,9 @@
#pragma once
#include "../ds/helpers.h"
#include "allocslab.h"
#include "metaslab.h"
#include "../ds/helpers.h"
#include <cstring>
namespace snmalloc
@@ -102,7 +103,7 @@ namespace snmalloc
{
curr = (curr + meta[curr].next + 1) & (SLAB_COUNT - 1);
}
assert (curr == 0);
assert(curr == 0);
for (auto i = 0; i < SLAB_COUNT; i++)
{