ソースを参照

wasm compilation issue fix

Summary: Fix for https://stackoverflow.com/questions/61775638/fasttext-wasm-wont-make

Reviewed By: EdouardGrave

Differential Revision: D21720261

fbshipit-source-id: 3fc5b8f4c268a9e126eb3d90b715aad88446721d
Onur Çelebi 5 年 前
コミット
c95dd78728
1 ファイル変更2 行追加2 行削除
  1. 2 2
      webassembly/fasttext_wasm.cc

+ 2 - 2
webassembly/fasttext_wasm.cc

@@ -175,7 +175,7 @@ Meter test(
   if (!ifs.is_open()) {
     throw std::invalid_argument("Test file cannot be opened!");
   }
-  Meter meter;
+  Meter meter(false);
   fasttext->test(ifs, k, threshold, meter);
   ifs.close();
 
@@ -270,7 +270,7 @@ EMSCRIPTEN_BINDINGS(fasttext) {
           allow_raw_pointers());
 
   class_<Meter>("Meter")
-      .constructor<>()
+      .constructor<bool>()
       .property(
           "precision", select_overload<double(void) const>(&Meter::precision))
       .property("recall", select_overload<double(void) const>(&Meter::recall))