From 8cb46e59376447d41013e6cf96bc7d9a4a02f691 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Fri, 3 Apr 2020 13:00:44 +0200 Subject: [PATCH] Fix compilation on Android arm64 --- libretroshare/src/ft/ftserver.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libretroshare/src/ft/ftserver.cc b/libretroshare/src/ft/ftserver.cc index 9f5c1d1bd..4c6c5b6c3 100644 --- a/libretroshare/src/ft/ftserver.cc +++ b/libretroshare/src/ft/ftserver.cc @@ -20,6 +20,9 @@ * * *******************************************************************************/ +#include +#include + #include "crypto/chacha20.h" //const int ftserverzone = 29539; @@ -50,8 +53,6 @@ #include "util/rsdebug.h" #include "util/rsdir.h" #include "util/rsprint.h" - -#include #include "util/rstime.h" #ifdef RS_DEEP_FILES_INDEX @@ -1974,15 +1975,17 @@ void ftServer::ftReceiveSearchResult(RsTurtleFTSearchResultItem *item) hasCallback = true; std::vector cRes; - for( const auto& tfiold : item->result) - cRes.push_back(tfiold); + std::transform( item->result.begin(), item->result.end(), + std::back_inserter(cRes), + [](const auto& it){ return TurtleFileInfoV2(it); } ); cbpt->second.first(cRes); } } // end RS_STACK_MUTEX(mSearchCallbacksMapMutex); if(!hasCallback) - RsServer::notify()->notifyTurtleSearchResult(item->PeerId(),item->request_id, item->result ); + RsServer::notify()->notifyTurtleSearchResult( + item->PeerId(), item->request_id, item->result ); } bool ftServer::receiveSearchRequest(