subsurface/core/version.cpp
Berthold Stoeger 60c7b503cf core: move data file version functions into version.cpp/h
It is unclear why these were located in divelist.cpp/h.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-08-13 19:28:30 +02:00

31 lines
624 B
C++

// SPDX-License-Identifier: GPL-2.0
#include "ssrf-version.h"
// let's leave the two redundant functions in case we change our minds on git SHAs
const char *subsurface_git_version()
{
return CANONICAL_VERSION_STRING_4;
}
const char *subsurface_canonical_version()
{
return CANONICAL_VERSION_STRING;
}
static int min_datafile_version = 0;
int get_min_datafile_version()
{
return min_datafile_version;
}
void report_datafile_version(int version)
{
if (min_datafile_version == 0 || min_datafile_version > version)
min_datafile_version = version;
}
int clear_min_datafile_version()
{
return min_datafile_version;
}