summaryrefslogtreecommitdiff
blob: 760c9b561055a7839de32f466488e101799dc4c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- rstudio-1.1.453-orig/src/cpp/core/DateTime.cpp	2018-05-15 04:19:30.000000000 +1000
+++ rstudio-1.1.453/src/cpp/core/DateTime.cpp	2018-07-02 16:19:21.335703471 +1000
@@ -65,7 +65,7 @@
    using namespace boost::posix_time;
 
    ptime time_t_epoch(date(1970,1,1));
-   return time_t_epoch + seconds(sec);
+   return time_t_epoch + seconds(static_cast<long>(sec));
 }
 
 boost::posix_time::ptime timeFromMillisecondsSinceEpoch(int64_t ms)
--- rstudio-1.1.453-orig/src/cpp/core/file_lock/FileLock.cpp	2018-05-15 04:19:30.000000000 +1000
+++ rstudio-1.1.453/src/cpp/core/file_lock/FileLock.cpp	2018-07-02 17:00:35.915695201 +1000
@@ -133,11 +133,11 @@
 
    // timeout interval
    double timeoutInterval = getFieldPositive(settings, "timeout-interval", kDefaultTimeoutInterval);
-   FileLock::s_timeoutInterval = boost::posix_time::seconds(timeoutInterval);
+   FileLock::s_timeoutInterval = boost::posix_time::seconds(static_cast<long>(timeoutInterval));
    
    // refresh rate
    double refreshRate = getFieldPositive(settings, "refresh-rate", kDefaultRefreshRate);
-   FileLock::s_refreshRate = boost::posix_time::seconds(refreshRate);
+   FileLock::s_refreshRate = boost::posix_time::seconds(static_cast<long>(refreshRate));
    
    // logging
    bool loggingEnabled = settings.getBool("enable-logging", false);
@@ -212,8 +212,8 @@
 
 // default values for static members
 FileLock::LockType FileLock::s_defaultType(FileLock::LOCKTYPE_LINKBASED);
-boost::posix_time::seconds FileLock::s_timeoutInterval(kDefaultTimeoutInterval);
-boost::posix_time::seconds FileLock::s_refreshRate(kDefaultRefreshRate);
+boost::posix_time::seconds FileLock::s_timeoutInterval(static_cast<long>(kDefaultTimeoutInterval));
+boost::posix_time::seconds FileLock::s_refreshRate(static_cast<long>(kDefaultRefreshRate));
 bool FileLock::s_loggingEnabled(false);
 bool FileLock::s_isLoadBalanced(false);
 FilePath FileLock::s_logFile;