mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-13 15:20:07 +02:00
52 lines
1.5 KiB
Plaintext
52 lines
1.5 KiB
Plaintext
From f3492e1e4bdfe1ac91d0bbfd6fd016ff5df0edcb Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Fri, 23 Jun 2017 20:55:59 +0200
|
|
Subject: time_t isn't always an int32.
|
|
|
|
|
|
diff --git a/sources-experimental/MainController.cpp b/sources-experimental/MainController.cpp
|
|
index 6f2358b..27f18b2 100644
|
|
--- a/sources-experimental/MainController.cpp
|
|
+++ b/sources-experimental/MainController.cpp
|
|
@@ -59,10 +59,6 @@ DownloadManager* download_manager;
|
|
#endif
|
|
|
|
|
|
-
|
|
-
|
|
-
|
|
-
|
|
//a tendere qui dovrebbe essere
|
|
//instaziato il model
|
|
MainController::MainController(MainWindow* view, MainModel* model){
|
|
@@ -1121,7 +1117,7 @@ MainController::CreateChannelItem(BEntry* e,BMessage* cache)
|
|
|
|
|
|
//check delle info di cache..
|
|
- time_t when=1;
|
|
+ int64 when=1;
|
|
time_t now=0;
|
|
if(node.GetModificationTime(&now)!=B_OK) now=0;
|
|
|
|
@@ -1130,7 +1126,7 @@ MainController::CreateChannelItem(BEntry* e,BMessage* cache)
|
|
int32 count;
|
|
|
|
if( cache->FindInt32(key.String(),&count)!=B_OK ||
|
|
- cache->FindInt32(row->GetURL().String(),&when)!=B_OK || when!=now) {
|
|
+ cache->FindInt64(row->GetURL().String(),&when)!=B_OK || (time_t)when!=now) {
|
|
printf("Recaching for.. %s\n",row->GetURL().String());
|
|
count=CountNewItems(row->fRef);
|
|
}
|
|
@@ -1615,7 +1611,7 @@ MainController::StoreStates(){
|
|
time_t when;
|
|
if(node.GetModificationTime(&when)==B_OK) {
|
|
BString key=row->GetURL();
|
|
- cache.AddInt32(key.String(),when);
|
|
+ cache.AddInt64(key.String(),(int64)when);
|
|
key << "_count";
|
|
cache.AddInt32(key.String(),row->GetNewCount());
|
|
}
|
|
--
|
|
2.12.2
|
|
|