diff --git a/Makefile b/Makefile index 2dec37c..634fbc1 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ VPATH += $(P)/src/Application $(P)/src/Editor $(P)/src/Editor/DearImGui ################################################### # Inform Makefile where to find header files # -INCLUDES += -I$(P)/include -I$(P)/src +INCLUDES += -I$(P)/include -I$(P)/src -I$(P)/external ################################################### # Project defines @@ -95,7 +95,7 @@ endif INCLUDES += -I$(THIRDPART)/imgui -I$(THIRDPART)/imgui/backends -I$(THIRDPART)/imgui/misc/cpp VPATH += $(THIRDPART)/imgui $(THIRDPART)/imgui/backends $(THIRDPART)/imgui/misc/cpp DEARIMGUI_OBJS += imgui_widgets.o imgui_draw.o imgui_tables.o imgui.o imgui_stdlib.o -DEARIMGUI_OBJS += imgui_demo.o +# DEARIMGUI_OBJS += imgui_demo.o ################################################### # Set thirdpart Dear ImGui Plot @@ -113,11 +113,13 @@ DEARIMGUI_OBJS += ImGuiFileDialog.o ################################################### # Set MQTT Library. # +ifneq ($(ARCHI),Emscripten) INCLUDES += -I$(THIRDPART) -I$(THIRDPART)/MQTT/include VPATH += $(THIRDPART)/MQTT/src DEFINES += -DMQTT_BROKER_ADDR=\"localhost\" DEFINES += -DMQTT_BROKER_PORT=1883 PKG_LIBS += libmosquitto +endif ################################################### # Set json Library. diff --git a/src/Net/TimedTokens.hpp b/src/Net/TimedTokens.hpp index 2edc076..8662878 100644 --- a/src/Net/TimedTokens.hpp +++ b/src/Net/TimedTokens.hpp @@ -47,27 +47,6 @@ struct TimedToken //-------------------------------------------------------------------------- TimedToken(Arc& arc_, size_t const tokens_, TypeOfNet const type_); - // I dunno why the code in the #else branch seems to make buggy animations - // with tokens that disapear. Cannot catch it by unit tests. - // https://github.com/Lecrapouille/TimedPetriNetEditor/issues/2 -# if 1 - - //-------------------------------------------------------------------------- - //! \brief Hack needed because of references - //-------------------------------------------------------------------------- - TimedToken& operator=(const TimedToken& obj) - { - this->~TimedToken(); // destroy - new (this) TimedToken(obj); // copy construct in place - return *this; - } - - TimedToken(const TimedToken&) = default; - TimedToken(TimedToken&&) = default; - TimedToken& operator=(TimedToken&&) = default; - -#else - //-------------------------------------------------------------------------- //! \brief Hack needed because of references //-------------------------------------------------------------------------- @@ -82,14 +61,14 @@ struct TimedToken //! \brief Needed to remove compilation warnings //-------------------------------------------------------------------------- TimedToken(TimedToken const& other) - : TimedToken(other.arc, other.tokens) + : TimedToken(other.arc, other.tokens, other.type) {} //-------------------------------------------------------------------------- //! \brief Needed to remove compilation warnings //-------------------------------------------------------------------------- TimedToken(TimedToken&& other) - : TimedToken(other.arc, other.tokens) + : TimedToken(other.arc, other.tokens, other.type) {} //-------------------------------------------------------------------------- @@ -102,8 +81,6 @@ struct TimedToken return *this; } -#endif - //-------------------------------------------------------------------------- //! \brief Update position on the screen. //! \param[in] dt: the delta time (in seconds) from the previous call.