Autoformat staged C++ and Rust

This commit is contained in:
Ingvar Stepanyan
2020-11-20 23:04:00 +00:00
committed by Ingvar Stepanyan
parent a699a5c4dc
commit 3ae1cf86f5
5 changed files with 20 additions and 17 deletions

View File

@@ -17,7 +17,10 @@ val decode(std::string buffer) {
int width, height;
std::unique_ptr<uint8_t[]> rgba(
WebPDecodeRGBA((const uint8_t*)buffer.c_str(), buffer.size(), &width, &height));
return rgba ? ImageData.new_(Uint8ClampedArray.new_(typed_memory_view(width * height * 4, rgba.get())), width, height) : val::null();
return rgba ? ImageData.new_(
Uint8ClampedArray.new_(typed_memory_view(width * height * 4, rgba.get())),
width, height)
: val::null();
}
EMSCRIPTEN_BINDINGS(my_module) {