redundancy reduced

This commit is contained in:
MihailRis
2024-04-30 14:49:55 +03:00
parent 8c86bcae54
commit 9b843817f8
10 changed files with 136 additions and 146 deletions
+2 -2
View File
@@ -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);