From d5fb7150a30f7ff1de2f30052994c1b4eaab3531 Mon Sep 17 00:00:00 2001 From: Matthew Parkinson Date: Thu, 24 Jan 2019 11:21:52 +0000 Subject: [PATCH] Clang format --- src/ds/helpers.h | 12 ++++++------ src/mem/superslab.h | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/ds/helpers.h b/src/ds/helpers.h index d96769b..5f1d55a 100644 --- a/src/ds/helpers.h +++ b/src/ds/helpers.h @@ -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 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; diff --git a/src/mem/superslab.h b/src/mem/superslab.h index 7c43c0b..7656c5d 100644 --- a/src/mem/superslab.h +++ b/src/mem/superslab.h @@ -1,8 +1,9 @@ #pragma once +#include "../ds/helpers.h" #include "allocslab.h" #include "metaslab.h" -#include "../ds/helpers.h" + #include 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++) {