disabled boost locale for ios

This commit is contained in:
cryptozoidberg 2021-11-04 11:42:11 +01:00
parent fbc50419db
commit 3331e419e5
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
4 changed files with 9 additions and 9 deletions

View file

@ -7,7 +7,7 @@
#include "include_base_utils.h"
#include <boost/foreach.hpp>
#ifndef ANDROID_BUILD
#ifndef MOBILE_WALLET_BUILD
#include <boost/locale.hpp>
#endif
using namespace epee;
@ -3208,7 +3208,7 @@ namespace currency
return o << "<" << r.n << ":" << r.tx_id << ">";
}
//--------------------------------------------------------------------------------
#ifndef ANDROID_BUILD
#ifndef MOBILE_WALLET_BUILD
const std::locale& utf8_get_conversion_locale()
{
static std::locale loc = boost::locale::generator().generate("en_US.UTF-8");

View file

@ -743,7 +743,7 @@ namespace currency
//---------------------------------------------------------------
std::ostream& operator <<(std::ostream& o, const ref_by_id& r);
//---------------------------------------------------------------
#ifndef ANDROID_BUILD
#ifndef MOBILE_WALLET_BUILD
std::string utf8_to_upper(const std::string& s);
std::string utf8_to_lower(const std::string& s);
bool utf8_substring_test_case_insensitive(const std::string& match, const std::string& s); // Returns true is 's' contains 'match' (case-insensitive)

View file

@ -56,7 +56,7 @@ namespace bc_services
//------------------------------------------------------------------
bool order_offers_by_name(const offer_details_ex* a, const offer_details_ex* b)
{
#ifndef ANDROID_BUILD
#ifndef MOBILE_WALLET_BUILD
return currency::utf8_to_lower(a->target) < currency::utf8_to_lower(b->target);
#else
return false;
@ -150,7 +150,7 @@ namespace bc_services
//check category
if (!of.category.empty() && o.category.find(of.category) == std::string::npos)
return false;
#ifndef ANDROID_BUILD
#ifndef MOBILE_WALLET_BUILD
//check target condition
if (of.target.size() && !currency::utf8_substring_test_case_insensitive(of.target, o.target))
return false;
@ -173,7 +173,7 @@ namespace bc_services
//check target condition
if (of.location_country.size() && (of.location_country != o.location_country))
return false;
#ifndef ANDROID_BUILD
#ifndef MOBILE_WALLET_BUILD
//check target condition
if (of.location_city.size() && !currency::utf8_substring_test_case_insensitive(of.location_city, o.location_city))
return false;
@ -221,7 +221,7 @@ namespace bc_services
//--------------------------------------------------------------------------------
bool filter_offers_list(std::list<bc_services::offer_details_ex>& offers, const bc_services::core_offers_filter& filter, uint64_t current_core_time)
{
#ifndef ANDROID_BUILD
#ifndef MOBILE_WALLET_BUILD
//filter
offers.remove_if([&](bc_services::offer_details_ex& o) -> bool {
return !is_offer_matched_by_filter(o, filter, current_core_time);

View file

@ -193,14 +193,14 @@ namespace bc_services
inline std::string extract_contacts(const odeh& v) { return v.contacts; }
inline std::string extract_location(const odeh& v) {
#ifndef ANDROID_BUILD
#ifndef MOBILE_WALLET_BUILD
return currency::utf8_to_lower(v.location_country + v.location_city);
#else
return "UNSUPORTED";
#endif
}
inline std::string extract_name(const odeh& v) {
#ifndef ANDROID_BUILD
#ifndef MOBILE_WALLET_BUILD
return currency::utf8_to_lower(v.target);
#else
return "UNSUPORTED";