change PutBlock to default to non-aligned access

pull/2/head
weidai 2007-05-04 15:32:55 +00:00
parent 7a18924f02
commit 31e06b9d0b
1 changed files with 4 additions and 4 deletions

8
misc.h
View File

@ -980,7 +980,7 @@ private:
const byte *m_block; const byte *m_block;
}; };
template <class T, class B, bool A=true> template <class T, class B, bool A=false>
class PutBlock class PutBlock
{ {
public: public:
@ -1002,12 +1002,12 @@ private:
byte *m_block; byte *m_block;
}; };
template <class T, class B, bool A=true> template <class T, class B, bool GA=true, bool PA=false>
struct BlockGetAndPut struct BlockGetAndPut
{ {
// function needed because of C++ grammatical ambiguity between expression-statements and declarations // function needed because of C++ grammatical ambiguity between expression-statements and declarations
static inline GetBlock<T, B, A> Get(const void *block) {return GetBlock<T, B, A>(block);} static inline GetBlock<T, B, GA> Get(const void *block) {return GetBlock<T, B, GA>(block);}
typedef PutBlock<T, B, A> Put; typedef PutBlock<T, B, PA> Put;
}; };
template <class T> template <class T>