1 From 002561b93ca719b5664bd63c7823b36d262377a6 Mon Sep 17 00:00:00 2001
2 From: Philipp Kerling <yol@casix.org>
3 Date: Sat, 11 May 2024 10:01:52 +0200
4 Subject: [PATCH 2/8] libUPnP: Fix warning about double promotion for
8 lib/libUPnP/Neptune/Source/Core/NptTime.cpp | 5 +++++
9 lib/libUPnP/Neptune/Source/Core/NptTime.h | 1 +
10 2 files changed, 6 insertions(+)
12 diff --git a/lib/libUPnP/Neptune/Source/Core/NptTime.cpp b/lib/libUPnP/Neptune/Source/Core/NptTime.cpp
13 index d842259e85..8615c71e43 100755
14 --- a/lib/libUPnP/Neptune/Source/Core/NptTime.cpp
15 +++ b/lib/libUPnP/Neptune/Source/Core/NptTime.cpp
16 @@ -72,6 +72,11 @@ NPT_TimeStamp::NPT_TimeStamp(const NPT_TimeStamp& timestamp)
17 /*----------------------------------------------------------------------
18 | NPT_TimeStamp::NPT_TimeStamp
19 +---------------------------------------------------------------------*/
20 +NPT_TimeStamp::NPT_TimeStamp(float seconds)
21 +: NPT_TimeStamp(static_cast<double>(seconds))
25 NPT_TimeStamp::NPT_TimeStamp(double seconds)
27 m_NanoSeconds = (NPT_Int64)(seconds * 1e9);
28 diff --git a/lib/libUPnP/Neptune/Source/Core/NptTime.h b/lib/libUPnP/Neptune/Source/Core/NptTime.h
29 index ae02a48c3d..8b58eefac6 100644
30 --- a/lib/libUPnP/Neptune/Source/Core/NptTime.h
31 +++ b/lib/libUPnP/Neptune/Source/Core/NptTime.h
32 @@ -54,6 +54,7 @@ class NPT_TimeStamp
33 NPT_TimeStamp(const NPT_TimeStamp& timestamp);
34 NPT_TimeStamp() : m_NanoSeconds(0) {}
35 NPT_TimeStamp(NPT_Int64 nanoseconds) : m_NanoSeconds(nanoseconds) {}
36 + NPT_TimeStamp(float seconds);
37 NPT_TimeStamp(double seconds);
38 NPT_TimeStamp& operator+=(const NPT_TimeStamp& time_stamp);
39 NPT_TimeStamp& operator-=(const NPT_TimeStamp& time_stamp);