mirror of https://github.com/libAthena/athena.git
* Fix Athena::utility::fillRandom
This commit is contained in:
parent
d113a91822
commit
5a26e21c5b
|
@ -40,7 +40,7 @@ double swapDouble(double val);
|
|||
|
||||
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::string join(const std::vector<std::string>& elems, const std::string& delims);
|
||||
|
|
|
@ -64,8 +64,6 @@ BinaryWriter::BinaryWriter(const std::string& filename, std::function<void(int)>
|
|||
|
||||
BinaryWriter::~BinaryWriter()
|
||||
{
|
||||
if (isOpen())
|
||||
save();
|
||||
delete[] m_data;
|
||||
m_data = nullptr;
|
||||
}
|
||||
|
|
|
@ -77,9 +77,9 @@ bool isSystemBigEndian()
|
|||
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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue