source: trunk/lib/bitblock_align.hpp @ 2133

Last change on this file since 2133 was 2133, checked in by ksherdy, 7 years ago

Fix assert_bitblock_align method.

File size: 564 bytes
Line 
1#ifndef BITBLOCK_ALIGN_HPP
2#define BITBLOCK_ALIGN_HPP
3
4/*=============================================================================
5  bitblock_align.hpp - Alignment assertion.
6  Created on:
7  Author: Ken Herdy
8=============================================================================*/
9
10#include "bitblock.hpp"
11#include <cassert>
12using namespace std;
13
14static IDISA_ALWAYS_INLINE void assert_bitblock_align(BitBlock v) {
15    assert(0 != (&v) & (sizeof(BitBlock)-1));
16}
17
18#define ASSERT_BITBLOCK_ALIGN(v) assert_bitblock_align(v)
19
20#endif // BITBLOCK_ALIGN_HPP
Note: See TracBrowser for help on using the repository browser.