renamed to DataArray instead of MemBlock
This commit is contained in:
18
inc/hgl/io/SaveDataArray.h
Normal file
18
inc/hgl/io/SaveDataArray.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include<hgl/type/DataArray.h>
|
||||
#include<hgl/filesystem/FileSystem.h>
|
||||
namespace hgl
|
||||
{
|
||||
/**
|
||||
* 保存一个数据阵列到文件
|
||||
*/
|
||||
template<typename T> static bool SaveDataArrayToFile(const OSString &filename,const DataArray<T> &mb)
|
||||
{
|
||||
const size_t size=mb.bytes();
|
||||
|
||||
if(size<=0)return(true);
|
||||
|
||||
return(hgl::filesystem::SaveMemoryToFile(filename,mb.data(),mb.bytes())==size);
|
||||
}
|
||||
}//namespace hgl
|
Reference in New Issue
Block a user