Skip to content

Commit

Permalink
sandbox, refactor: convert the result of readFile to Buffer directly …
Browse files Browse the repository at this point in the history
…to avoid introducing multiple type conversions.
  • Loading branch information
xicilion committed May 29, 2023
1 parent 64ea150 commit 1d3353b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fibjs/src/sandbox/SandBox_resolve.cpp
Expand Up @@ -28,7 +28,7 @@ result_t SandBox::loadFile(exlib::string fname, obj_ptr<Buffer_base>& data)
data = new Buffer();
hr = 0;
} else
data = Buffer_base::getInstance(var);
data = (Buffer_base*)var.object();

return hr;
}
Expand Down

0 comments on commit 1d3353b

Please sign in to comment.