mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
refactor a bit
This commit is contained in:
parent
667a90b724
commit
afedd103e8
3 changed files with 8 additions and 9 deletions
|
|
@ -50,7 +50,7 @@ char* files::read_bytes(path filename, size_t& length) {
|
|||
length = input.tellg();
|
||||
input.seekg(0, std::ios_base::beg);
|
||||
|
||||
unique_ptr<char> data {new char[length]};
|
||||
unique_ptr<char> data(new char[length]);
|
||||
input.read(data.get(), length);
|
||||
input.close();
|
||||
return data.release();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue