diff --git a/Framework/Kernel/CMakeLists.txt b/Framework/Kernel/CMakeLists.txt index 20123a0f94869668502d9a26e17c36153104e065..57c705ed923ce3813d57755ed11147e0c67a8a4a 100644 --- a/Framework/Kernel/CMakeLists.txt +++ b/Framework/Kernel/CMakeLists.txt @@ -25,7 +25,6 @@ set ( SRC_FILES src/DirectoryValidator.cpp src/DiskBuffer.cpp src/DllOpen.cpp - src/EmptyValues.cpp src/EnabledWhenProperty.cpp src/EnvironmentHistory.cpp src/EqualBinsChecker.cpp diff --git a/Framework/Kernel/inc/MantidKernel/EmptyValues.h b/Framework/Kernel/inc/MantidKernel/EmptyValues.h index 4e7f0011c878ee20952bca06773ed7f68d1f7593..28353941eb37310259a3f8fdd756a82aaf1eaa56 100644 --- a/Framework/Kernel/inc/MantidKernel/EmptyValues.h +++ b/Framework/Kernel/inc/MantidKernel/EmptyValues.h @@ -15,19 +15,35 @@ #include "MantidKernel/DllConfig.h" #include "MantidKernel/System.h" +#include <cfloat> +#include <climits> + namespace Mantid { -/// Returns what we consider an "empty" integer -DLLExport int EMPTY_INT(); +/** + * Returns what we consider an "empty" integer within a property + * @returns An flag value + */ +constexpr int EMPTY_INT() { return INT_MAX; } + +/** + * Returns what we consider an "empty" long within a property + * @returns An flag value + */ +constexpr long EMPTY_LONG() { return LONG_MAX; } -/// Returns what we consider an "empty" long -DLLExport long EMPTY_LONG(); +/** + * Returns what we consider an "empty" int64_t within a property + * @returns An flag value + */ +constexpr int64_t EMPTY_INT64() { return INT64_MAX; } -/// Returns what we consider an "empty" int64_t -DLLExport int64_t EMPTY_INT64(); +/** + * Returns what we consider an "empty" double within a property + * @returns An flag value + */ +constexpr double EMPTY_DBL() { return DBL_MAX / 2; } -/// Return what we consider to be an empty double -DLLExport double EMPTY_DBL(); } // namespace Mantid #endif // MANTID_KERNEL_EMPTYVALUES_H_ diff --git a/Framework/Kernel/src/EmptyValues.cpp b/Framework/Kernel/src/EmptyValues.cpp deleted file mode 100644 index aa21ee810b748f553efc0eb180461968f8c546be..0000000000000000000000000000000000000000 --- a/Framework/Kernel/src/EmptyValues.cpp +++ /dev/null @@ -1,40 +0,0 @@ -// Mantid Repository : https://github.com/mantidproject/mantid -// -// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin -// SPDX - License - Identifier: GPL - 3.0 + -//------------------------------------------------------------------------------ -// Includes -//------------------------------------------------------------------------------ -#include "MantidKernel/EmptyValues.h" -#include <cfloat> -#include <climits> - -namespace Mantid { - -/** - * Returns what we consider an "empty" integer within a property - * @returns An flag value - */ -int EMPTY_INT() { return INT_MAX; } - -/** - * Returns what we consider an "empty" long within a property - * @returns An flag value - */ -long EMPTY_LONG() { return LONG_MAX; } - -/** - * Returns what we consider an "empty" int64_t within a property - * @returns An flag value - */ -int64_t EMPTY_INT64() { return INT64_MAX; } - -/** - * Returns what we consider an "empty" double within a property - * @returns An flag value - */ -double EMPTY_DBL() { return DBL_MAX / 2; } - -} // namespace Mantid