aboutsummaryrefslogtreecommitdiff
path: root/web/adapter.cpp
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-05-30 14:06:34 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-05-30 14:06:34 +0200
commit37a2ebd4bffa99d465396fde0acfc52284ee3b7c (patch)
tree617921a35782fd81bbf76dcbd09ccc539361155e /web/adapter.cpp
parentdc47c318bd7272099ec8a66ddc48810f91fa52b9 (diff)
downloadnissy-core-37a2ebd4bffa99d465396fde0acfc52284ee3b7c.tar.gz
nissy-core-37a2ebd4bffa99d465396fde0acfc52284ee3b7c.zip
More improvements to web solver
Diffstat (limited to 'web/adapter.cpp')
-rw-r--r--web/adapter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/adapter.cpp b/web/adapter.cpp
index 31d00fe..0022b0d 100644
--- a/web/adapter.cpp
+++ b/web/adapter.cpp
@@ -145,7 +145,7 @@ bool init_solver_generate(const std::string& name)
145 } else { 145 } else {
146 log("Error storing the data (the solver is usable, " 146 log("Error storing the data (the solver is usable, "
147 "but the data will have to be re-generated next " 147 "but the data will have to be re-generated next "
148 "time you want to use it)"); 148 "time you want to use it)\n");
149 } 149 }
150 150
151 return true; 151 return true;
@@ -179,7 +179,7 @@ nissy::solver::solve_result solve(std::string name,
179 } 179 }
180 180
181 return loaded_solvers.at(name).solve(cube, nissflag, minmoves, 181 return loaded_solvers.at(name).solve(cube, nissflag, minmoves,
182 maxmoves, maxsols, optimal, threads, NULL, &poll_status_id); 182 maxmoves, maxsols, optimal, threads, poll_status, &poll_status_id);
183} 183}
184 184
185EMSCRIPTEN_BINDINGS(Nissy) 185EMSCRIPTEN_BINDINGS(Nissy)
@@ -194,6 +194,7 @@ EMSCRIPTEN_BINDINGS(Nissy)
194 194
195 emscripten::class_<nissy::error>("Error") 195 emscripten::class_<nissy::error>("Error")
196 .function("ok", &nissy::error::ok) 196 .function("ok", &nissy::error::ok)
197 .property("value", &nissy::error::value)
197 .class_property("unsolvableWarning", 198 .class_property("unsolvableWarning",
198 &nissy::error::UNSOLVABLE_WARNING) 199 &nissy::error::UNSOLVABLE_WARNING)
199 .class_property("unsolvableError", 200 .class_property("unsolvableError",

Generated with cgit - Back to sebastiano.tronto.net