mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-12 07:53:37 +02:00
fix compile
Origin commit data
------------------
Commit: 8c44c161c2
Author: vanhofen <vanhofen@gmx.de>
Date: 2022-01-20 (Thu, 20 Jan 2022)
Origin message was:
------------------
- fix compile
This commit is contained in:
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#include <neutrinoMessages.h>
|
#include <neutrinoMessages.h>
|
||||||
#include <driver/movieinfo.h>
|
#include <driver/movieinfo.h>
|
||||||
|
#include <gui/widget/menue.h>
|
||||||
|
|
||||||
#include <hardware/record.h>
|
#include <hardware/record.h>
|
||||||
|
|
||||||
|
@@ -184,7 +184,7 @@ bool CWeather::GetWeatherDetails()
|
|||||||
|
|
||||||
bool CWeather::FindCoords(int postcode, std::string country, int pc_len)
|
bool CWeather::FindCoords(int postcode, std::string country, int pc_len)
|
||||||
{
|
{
|
||||||
std::string pcode = std::to_string(postcode);
|
std::string pcode = to_string(postcode);
|
||||||
unsigned int number_of_zeros = pc_len - pcode.length();
|
unsigned int number_of_zeros = pc_len - pcode.length();
|
||||||
pcode.insert(0, number_of_zeros, '0');
|
pcode.insert(0, number_of_zeros, '0');
|
||||||
std::string data = "http://api.openweathermap.org/geo/1.0/zip?zip=" + pcode + "," + country + "&appid=" + key;
|
std::string data = "http://api.openweathermap.org/geo/1.0/zip?zip=" + pcode + "," + country + "&appid=" + key;
|
||||||
@@ -217,7 +217,7 @@ bool CWeather::FindCoords(int postcode, std::string country, int pc_len)
|
|||||||
float lat = DataValues["lat"].asFloat();
|
float lat = DataValues["lat"].asFloat();
|
||||||
float lon = DataValues["lon"].asFloat();
|
float lon = DataValues["lon"].asFloat();
|
||||||
g_settings.weather_city = DataValues["name"].asString();
|
g_settings.weather_city = DataValues["name"].asString();
|
||||||
g_settings.weather_location = std::to_string(lat) + "," + std::to_string(lon);
|
g_settings.weather_location = to_string(lat) + "," + to_string(lon);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user