43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
|
From f7485813af8e50f88c77312fb29b7bb489a0a17d Mon Sep 17 00:00:00 2001
|
||
|
From: Adam Majer <amajer@suse.de>
|
||
|
Date: Wed, 23 May 2018 10:45:56 +0200
|
||
|
Subject: [PATCH] Fix build with Boost 1.67
|
||
|
|
||
|
Boost:DateTime that no longer accepts non-integer types.
|
||
|
In the past, these types were implicitly cast down to integer
|
||
|
values. Now this requires explicit cast.
|
||
|
|
||
|
https://svn.boost.org/trac10/ticket/11168
|
||
|
|
||
|
This fixes #60
|
||
|
---
|
||
|
--- src/spreadsheet/sheet.cpp 2017-11-16 00:12:57.000000000 +0100
|
||
|
+++ - 2018-10-01 19:35:16.014316314 +0200
|
||
|
@@ -387,7 +387,7 @@
|
||
|
|
||
|
double days_since_epoch = (d - origin).days();
|
||
|
|
||
|
- double ms = second * 1000000.0;
|
||
|
+ long ms = second * 1000000.0;
|
||
|
|
||
|
posix_time::time_duration t(
|
||
|
posix_time::hours(hour) +
|
||
|
@@ -731,7 +731,7 @@
|
||
|
if (time_fraction)
|
||
|
{
|
||
|
// Convert a fraction day to microseconds.
|
||
|
- double ms = time_fraction * 24.0 * 60.0 * 60.0 * 1000000.0;
|
||
|
+ long long ms = time_fraction * 24.0 * 60.0 * 60.0 * 1000000.0;
|
||
|
posix_time::time_duration td = posix_time::microsec(ms);
|
||
|
|
||
|
hours = td.hours();
|
||
|
@@ -740,7 +740,7 @@
|
||
|
|
||
|
td -= posix_time::hours(hours);
|
||
|
td -= posix_time::minutes(minutes);
|
||
|
- td -= posix_time::seconds(seconds);
|
||
|
+ td -= posix_time::seconds((long)seconds);
|
||
|
|
||
|
ms = td.total_microseconds(); // remaining microseconds.
|
||
|
|