Skip to content

Commit

Permalink
Refactor ProcessAlgorithm to use a global string and update makefile-…
Browse files Browse the repository at this point in the history
…emcc to remove debug flag
  • Loading branch information
Oleg Sh committed Dec 28, 2024
1 parent 5271299 commit 15130d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion GraphOffline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ extern "C" {
const char* ProcessAlgorithm(const char* emscriptParams);
}

std::string res;
const char* ProcessAlgorithm(const char* emscriptParams)
{
static std::string res;
if (strcmp(emscriptParams, EMSCRIPT_DELEMITER) == 0)
{
res = "test";
Expand Down
2 changes: 1 addition & 1 deletion makefile-emcc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ GRAPH_DIR = graph
OBJ_DIR = bin/emscripten/obj

# Declaration of variables
CXX = EMCC_DEBUG=1 emcc
CXX = emcc
CPPFLAGS += -std=c++17 -Wall -I. -I $(ALGORITHM_DIR) -I $(PUGIXML_DIR) -I $(REPORT_DIR) -I $(COMMON_DIR) -I $(GRAPH_DIR) -I $(LIB_DIR) -DEMSCRIPT
LINKFLAGS += -s EXPORTED_FUNCTIONS='_ProcessAlgorithm' -s EXPORTED_RUNTIME_METHODS=ccall,cwrap

Expand Down

0 comments on commit 15130d1

Please sign in to comment.