* Fix Athena::utility::fillRandom

This commit is contained in:
Phillip Stephens 2014-06-29 17:26:34 -07:00
parent d113a91822
commit 5a26e21c5b
3 changed files with 3 additions and 5 deletions

View File

@ -40,7 +40,7 @@ double swapDouble(double val);
bool isSystemBigEndian(); bool isSystemBigEndian();
void fillRandom(atUint8 * rndArea, atUint8 count); void fillRandom(atUint8 * rndArea, atUint64 count);
std::vector<std::string> split(const std::string &s, char delim); std::vector<std::string> split(const std::string &s, char delim);
std::string join(const std::vector<std::string>& elems, const std::string& delims); std::string join(const std::vector<std::string>& elems, const std::string& delims);

View File

@ -64,8 +64,6 @@ BinaryWriter::BinaryWriter(const std::string& filename, std::function<void(int)>
BinaryWriter::~BinaryWriter() BinaryWriter::~BinaryWriter()
{ {
if (isOpen())
save();
delete[] m_data; delete[] m_data;
m_data = nullptr; m_data = nullptr;
} }

View File

@ -77,9 +77,9 @@ bool isSystemBigEndian()
return (*(atUint16*)test == 0xFEFF); return (*(atUint16*)test == 0xFEFF);
} }
void fillRandom(atUint8 * rndArea, atUint8 count) void fillRandom(atUint8 * rndArea, atUint64 count)
{ {
for(atUint16 i = 0; i < count; i++) for(atUint64 i = 0; i < count; i++)
rndArea[i]=rand(); rndArea[i]=rand();
} }