From 68c6d8d94c21bbdcf55a041befa13f679d510b0e Mon Sep 17 00:00:00 2001 From: Darby Johnston Date: Sun, 29 Mar 2026 09:35:21 -0700 Subject: [PATCH 1/2] Fix DEFAULT_EPSILON_s visiblity Signed-off-by: Darby Johnston --- src/opentime/CMakeLists.txt | 1 + src/opentime/timeRange.cpp | 6 ++++++ src/opentime/timeRange.h | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/opentime/CMakeLists.txt b/src/opentime/CMakeLists.txt index 47e50b40f8..18393a9ae1 100644 --- a/src/opentime/CMakeLists.txt +++ b/src/opentime/CMakeLists.txt @@ -13,6 +13,7 @@ set(OPENTIME_HEADER_FILES add_library(opentime ${OTIO_SHARED_OR_STATIC_LIB} errorStatus.cpp rationalTime.cpp + timeRange.cpp ${OPENTIME_HEADER_FILES}) add_library(OTIO::opentime ALIAS opentime) diff --git a/src/opentime/timeRange.cpp b/src/opentime/timeRange.cpp index c57dd643e9..9ba73885ee 100644 --- a/src/opentime/timeRange.cpp +++ b/src/opentime/timeRange.cpp @@ -2,3 +2,9 @@ // Copyright Contributors to the OpenTimelineIO project #include "opentime/timeRange.h" + +namespace opentime { namespace OPENTIME_VERSION_NS { + +const double DEFAULT_EPSILON_s = 1.0 / (2 * 192000.0); + +}} // namespace opentime::OPENTIME_VERSION_NS diff --git a/src/opentime/timeRange.h b/src/opentime/timeRange.h index e0ea251234..70060f1cfd 100644 --- a/src/opentime/timeRange.h +++ b/src/opentime/timeRange.h @@ -16,7 +16,7 @@ namespace opentime { namespace OPENTIME_VERSION_NS { /// a resolution of half a frame at 192kHz. The value can be changed in the future if /// necessary, due to higher sampling rates or some other kind of numeric tolerance /// detected in the library. -OPENTIME_API constexpr double DEFAULT_EPSILON_s = 1.0 / (2 * 192000.0); +OPENTIME_API extern const double DEFAULT_EPSILON_s; /// @brief This class represents a time range defined by a start time and duration. /// From 4c970be9a270a7b26d13344efeff5fe4db0ba9cb Mon Sep 17 00:00:00 2001 From: Darby Johnston Date: Sun, 29 Mar 2026 09:41:02 -0700 Subject: [PATCH 2/2] Fix DEFAULT_EPSILON_s visiblity Signed-off-by: Darby Johnston --- src/opentime/CMakeLists.txt | 1 - src/opentime/timeRange.cpp | 6 ------ src/opentime/timeRange.h | 2 +- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/opentime/CMakeLists.txt b/src/opentime/CMakeLists.txt index 18393a9ae1..47e50b40f8 100644 --- a/src/opentime/CMakeLists.txt +++ b/src/opentime/CMakeLists.txt @@ -13,7 +13,6 @@ set(OPENTIME_HEADER_FILES add_library(opentime ${OTIO_SHARED_OR_STATIC_LIB} errorStatus.cpp rationalTime.cpp - timeRange.cpp ${OPENTIME_HEADER_FILES}) add_library(OTIO::opentime ALIAS opentime) diff --git a/src/opentime/timeRange.cpp b/src/opentime/timeRange.cpp index 9ba73885ee..c57dd643e9 100644 --- a/src/opentime/timeRange.cpp +++ b/src/opentime/timeRange.cpp @@ -2,9 +2,3 @@ // Copyright Contributors to the OpenTimelineIO project #include "opentime/timeRange.h" - -namespace opentime { namespace OPENTIME_VERSION_NS { - -const double DEFAULT_EPSILON_s = 1.0 / (2 * 192000.0); - -}} // namespace opentime::OPENTIME_VERSION_NS diff --git a/src/opentime/timeRange.h b/src/opentime/timeRange.h index 70060f1cfd..68fa2f895e 100644 --- a/src/opentime/timeRange.h +++ b/src/opentime/timeRange.h @@ -16,7 +16,7 @@ namespace opentime { namespace OPENTIME_VERSION_NS { /// a resolution of half a frame at 192kHz. The value can be changed in the future if /// necessary, due to higher sampling rates or some other kind of numeric tolerance /// detected in the library. -OPENTIME_API extern const double DEFAULT_EPSILON_s; +inline constexpr double DEFAULT_EPSILON_s = 1.0 / (2 * 192000.0); /// @brief This class represents a time range defined by a start time and duration. ///