Misc. More...
Functions | |
void | WordToBytes (unsigned word, byte *out) |
Converts a word to an array of bytes. | |
unsigned | BytesToWord (const byte *bytes) |
Converts an array of four bytes into a word. | |
int | NumBytesToHoldBits (int bits) |
Returns the number of bytes need to hold the given number of bits. | |
template<typename TYPE > | |
std::string | PrintVector (const std::vector< TYPE > &v) |
Prints a vector with a space between elements. |
Misc.
Utilities.
unsigned MiscUtil::BytesToWord | ( | const byte * | bytes | ) |
Converts an array of four bytes into a word.
Definition at line 20 of file Misc.cpp.
Referenced by DfsData::Unpack().
int MiscUtil::NumBytesToHoldBits | ( | int | bits | ) |
std::string MiscUtil::PrintVector | ( | const std::vector< TYPE > & | v | ) | [inline] |
Prints a vector with a space between elements.
Definition at line 40 of file Misc.hpp.
Referenced by WolvePlayer::Search(), and WolveEngine::WolveParam().
void MiscUtil::WordToBytes | ( | unsigned | word, | |
byte * | out | |||
) |
Converts a word to an array of bytes.
Definition at line 12 of file Misc.cpp.
References byte.
Referenced by DfsData::Pack().