File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ add_library(reactive STATIC
2424 src/Var.cpp
2525)
2626
27- if (CMAKE_BUILD_TYPE MATCHES "Debug" )
28- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer" )
29- set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address" )
30- endif ()
27+ # if(CMAKE_BUILD_TYPE MATCHES "Debug")
28+ # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
29+ # set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
30+ # endif()
3131
3232target_include_directories (reactive PRIVATE ./src )
3333target_include_directories (reactive PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} /include )
Original file line number Diff line number Diff line change @@ -24,9 +24,20 @@ namespace Reactive
2424 self.execute ();
2525 }
2626
27- Computation * getLowest (Computation * lowestSoFar) const override
27+ Computation* getLowest (Computation* lowestSoFar) const override
2828 {
29- return self.m_dirty ? self.m_computation .get () : nullptr ;
29+ if (!self.m_dirty )
30+ self.resolveDirtynessDownstream ();
31+
32+ if (!self.m_dirty )
33+ return lowestSoFar;
34+
35+ auto my = self.m_computation .get ();
36+
37+ if (!lowestSoFar)
38+ return my;
39+
40+ return my->getDepth () < lowestSoFar->getDepth () ? lowestSoFar : my;
3041 }
3142 };
3243
Original file line number Diff line number Diff line change @@ -57,4 +57,4 @@ namespace Reactive
5757 lowestSoFar = it->get ();
5858 return lowestSoFar;
5959 }
60- } // namespace Reactive
60+ }
You can’t perform that action at this time.
0 commit comments