From b294a71613924d4b33764569ef9737822c34272b Mon Sep 17 00:00:00 2001 From: Michal Maciola <71131832+mmaciola@users.noreply.github.com> Date: Thu, 9 Sep 2021 10:40:19 +0200 Subject: [PATCH] wasm: remove default data (#789) --- src/wasm/thorvgwasm.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/wasm/thorvgwasm.cpp b/src/wasm/thorvgwasm.cpp index 88352a5f..d6cf0966 100644 --- a/src/wasm/thorvgwasm.cpp +++ b/src/wasm/thorvgwasm.cpp @@ -29,8 +29,6 @@ using namespace emscripten; using namespace std; using namespace tvg; -string defaultData(""); - class __attribute__((visibility("default"))) ThorvgWasm : public IteratorModule { public: @@ -44,11 +42,6 @@ public: return mErrorMsg; } - string getDefaultData() - { - return defaultData; - } - bool load(string data, string mimetype, int width, int height) { mErrorMsg = "None"; @@ -66,7 +59,6 @@ public: mSwCanvas->clear(); - if (data.empty()) data = defaultData; if (mPicture->load(data.c_str(), data.size(), mimetype, false) != Result::Success) { /* mPicture is not handled as unique_ptr yet, so delete here */ delete(mPicture); @@ -307,7 +299,6 @@ EMSCRIPTEN_BINDINGS(thorvg_bindings) { class_("ThorvgWasm") .constructor(&ThorvgWasm::create) .function("getError", &ThorvgWasm::getError, allow_raw_pointers()) - .function("getDefaultData", &ThorvgWasm::getDefaultData, allow_raw_pointers()) .function("load", &ThorvgWasm::load) .function("update", &ThorvgWasm::update) .function("render", &ThorvgWasm::render)