Fix deep search compiling on 32bit time_t targets

This commit is contained in:
Gioacchino Mazzurco 2018-10-18 04:21:23 +02:00
parent 2bb24075c4
commit 945775e9f5
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051
2 changed files with 4 additions and 1 deletions

View File

@ -264,7 +264,8 @@ private:
static std::string timetToXapianDate(const rstime_t& time)
{
char date[] = "YYYYMMDD\0";
std::strftime(date, 9, "%Y%m%d", std::gmtime(&time));
time_t tTime = static_cast<time_t>(time);
std::strftime(date, 9, "%Y%m%d", std::gmtime(&tTime));
return date;
}
};

View File

@ -5140,11 +5140,13 @@ TurtleRequestId RsGxsNetService::turtleSearchRequest(const std::string& match_st
return mGxsNetTunnel->turtleSearchRequest(match_string,this) ;
}
#ifndef RS_DEEP_SEARCH
static bool termSearch(const std::string& src, const std::string& substring)
{
/* always ignore case */
return src.end() != std::search( src.begin(), src.end(), substring.begin(), substring.end(), RsRegularExpression::CompareCharIC() );
}
#endif // ndef RS_DEEP_SEARCH
bool RsGxsNetService::retrieveDistantSearchResults(TurtleRequestId req,std::map<RsGxsGroupId,RsGxsGroupSummary>& group_infos)
{