* Changed swap* functions to both return, and take a reference

* Fixed writeInt64 in FileWriter
* Fixed ec.cpp on big endian systems
This commit is contained in:
2014-04-25 15:17:52 -07:00
parent b7c359ea40
commit 6150d728a5
4 changed files with 29 additions and 22 deletions

View File

@@ -219,7 +219,7 @@ void FileWriter::writeUint64(Uint64 val)
m_bitValid = false;
if ((!utility::isSystemBigEndian() && isBigEndian()) || (utility::isSystemBigEndian() && isLittleEndian()))
val = utility::swapU32(val);
val = utility::swapU64(val);
if (fwrite(&val, 1, sizeof(Uint64), m_fileHandle) != sizeof(Uint64))
THROW_IO_EXCEPTION("Unable to write to stream");