mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
redundancy reduced
This commit is contained in:
parent
8c86bcae54
commit
9b843817f8
10 changed files with 136 additions and 146 deletions
|
|
@ -90,9 +90,9 @@ static int l_file_mkdirs(lua_State* L) {
|
|||
static int l_file_read_bytes(lua_State* L) {
|
||||
fs::path path = resolve_path(L, lua_tostring(L, 1));
|
||||
if (fs::is_regular_file(path)) {
|
||||
size_t length = (size_t) fs::file_size(path);
|
||||
size_t length = static_cast<size_t>(fs::file_size(path));
|
||||
|
||||
ubyte* bytes = files::read_bytes(path, length);
|
||||
auto bytes = files::read_bytes(path, length);
|
||||
|
||||
lua_createtable(L, length, 0);
|
||||
int newTable = lua_gettop(L);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue