Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2fd0cd4ea1 | ||
|
|
a6ba598e9a |
@ -29,6 +29,9 @@ MACRO_ENSURE_OUT_OF_SOURCE_BUILD(
|
|||||||
"We don't support building in source, please create a build folder elsewhere and remember to run git clean -xdf to remove temporary files created by CMake."
|
"We don't support building in source, please create a build folder elsewhere and remember to run git clean -xdf to remove temporary files created by CMake."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#Option for memory debugging
|
||||||
|
option(SUBSURFACE_ASAN_BUILD "enable memory debugging of Subsurface binary" OFF)
|
||||||
|
|
||||||
#Option for profiling
|
#Option for profiling
|
||||||
option(SUBSURFACE_PROFILING_BUILD "enable profiling of Subsurface binary" OFF)
|
option(SUBSURFACE_PROFILING_BUILD "enable profiling of Subsurface binary" OFF)
|
||||||
|
|
||||||
@ -110,6 +113,11 @@ if (SUBSURFACE_PROFILING_BUILD)
|
|||||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
|
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
|
||||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg")
|
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg")
|
||||||
endif()
|
endif()
|
||||||
|
# set up ASan
|
||||||
|
if (SUBSURFACE_ASAN_BUILD)
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
||||||
|
endif()
|
||||||
|
|
||||||
# every compiler understands -Wall
|
# every compiler understands -Wall
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||||
|
|||||||
@ -377,6 +377,9 @@ void StatsView::replotIfVisible()
|
|||||||
|
|
||||||
void StatsView::divesSelected(const QVector<dive *> &dives)
|
void StatsView::divesSelected(const QVector<dive *> &dives)
|
||||||
{
|
{
|
||||||
|
if (dive_table.nr <= 0)
|
||||||
|
// there are no dives, don't bother (this can happen during reset, for example)
|
||||||
|
return;
|
||||||
if (isVisible()) {
|
if (isVisible()) {
|
||||||
for (auto &series: series)
|
for (auto &series: series)
|
||||||
series->divesSelected(dives);
|
series->divesSelected(dives);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user