summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorHubert Jarosz <marqin.pl@gmail.com>2016-05-21 15:29:25 +0200
committerHubert Jarosz <marqin.pl@gmail.com>2016-05-21 15:29:25 +0200
commit33403d91f77f1f34b19bff763391500bc9c2616c (patch)
tree67b2f4f4f1d69b198af548a7358b98904d9581ae /core
parentb0a5347a1ceaff56e88d33fb13df2a91abae594f (diff)
remove trailing whitespace
Diffstat (limited to 'core')
-rw-r--r--core/bind/core_bind.cpp32
-rw-r--r--core/io/http_client.cpp2
-rw-r--r--core/ustring.cpp2
3 files changed, 18 insertions, 18 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 45d089599b..e8703dccca 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -500,9 +500,9 @@ void _OS::set_icon(const Image& p_icon) {
}
/**
- * Get current datetime with consideration for utc and
+ * Get current datetime with consideration for utc and
* dst
- */
+ */
Dictionary _OS::get_datetime(bool utc) const {
Dictionary dated = get_date(utc);
@@ -564,17 +564,17 @@ uint64_t _OS::get_unix_time_from_datetime(Dictionary datetime) const {
// Get all time values from the dictionary, set to zero if it doesn't exist.
// Risk incorrect calculation over throwing errors
- unsigned int second = ((datetime.has(SECOND_KEY))?
+ unsigned int second = ((datetime.has(SECOND_KEY))?
static_cast<unsigned int>(datetime[SECOND_KEY]): 0);
- unsigned int minute = ((datetime.has(MINUTE_KEY))?
+ unsigned int minute = ((datetime.has(MINUTE_KEY))?
static_cast<unsigned int>(datetime[MINUTE_KEY]): 0);
- unsigned int hour = ((datetime.has(HOUR_KEY))?
+ unsigned int hour = ((datetime.has(HOUR_KEY))?
static_cast<unsigned int>(datetime[HOUR_KEY]): 0);
- unsigned int day = ((datetime.has(DAY_KEY))?
+ unsigned int day = ((datetime.has(DAY_KEY))?
static_cast<unsigned int>(datetime[DAY_KEY]): 0);
- unsigned int month = ((datetime.has(MONTH_KEY))?
+ unsigned int month = ((datetime.has(MONTH_KEY))?
static_cast<unsigned int>(datetime[MONTH_KEY]) -1: 0);
- unsigned int year = ((datetime.has(YEAR_KEY))?
+ unsigned int year = ((datetime.has(YEAR_KEY))?
static_cast<unsigned int>(datetime[YEAR_KEY]):0);
/// How many days come before each month (0-12)
@@ -604,7 +604,7 @@ uint64_t _OS::get_unix_time_from_datetime(Dictionary datetime) const {
ERR_FAIL_COND_V( day > MONTH_DAYS_TABLE[LEAPYEAR(year)][month], 0);
// Calculate all the seconds from months past in this year
- uint64_t SECONDS_FROM_MONTHS_PAST_THIS_YEAR =
+ uint64_t SECONDS_FROM_MONTHS_PAST_THIS_YEAR =
DAYS_PAST_THIS_YEAR_TABLE[LEAPYEAR(year)][month] * SECONDS_PER_DAY;
uint64_t SECONDS_FROM_YEARS_PAST = 0;
@@ -614,13 +614,13 @@ uint64_t _OS::get_unix_time_from_datetime(Dictionary datetime) const {
SECONDS_PER_DAY;
}
- uint64_t epoch =
- second +
- minute * SECONDS_PER_MINUTE +
+ uint64_t epoch =
+ second +
+ minute * SECONDS_PER_MINUTE +
hour * SECONDS_PER_HOUR +
// Subtract 1 from day, since the current day isn't over yet
// and we cannot count all 24 hours.
- (day-1) * SECONDS_PER_DAY +
+ (day-1) * SECONDS_PER_DAY +
SECONDS_FROM_MONTHS_PAST_THIS_YEAR +
SECONDS_FROM_YEARS_PAST;
return epoch;
@@ -631,7 +631,7 @@ uint64_t _OS::get_unix_time_from_datetime(Dictionary datetime) const {
* Get a dictionary of time values when given epoch time
*
* Dictionary Time values will be a union if values from #get_time
- * and #get_date dictionaries (with the exception of dst =
+ * and #get_date dictionaries (with the exception of dst =
* day light standard time, as it cannot be determined from epoch)
*
* @param unix_time_val epoch time to convert
@@ -660,14 +660,14 @@ Dictionary _OS::get_datetime_from_unix_time( uint64_t unix_time_val) const {
time.hour = dayclock / 3600;
/* day 0 was a thursday */
- date.weekday = static_cast<OS::Weekday>((dayno + 4) % 7);
+ date.weekday = static_cast<OS::Weekday>((dayno + 4) % 7);
while (dayno >= YEARSIZE(year)) {
dayno -= YEARSIZE(year);
year++;
}
- date.year = year;
+ date.year = year;
size_t imonth = 0;
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp
index 680e0ef7f9..11f9536243 100644
--- a/core/io/http_client.cpp
+++ b/core/io/http_client.cpp
@@ -116,7 +116,7 @@ Error HTTPClient::request_raw( Method p_method, const String& p_url, const Vecto
}
request+="\r\n";
CharString cs=request.utf8();
-
+
DVector<uint8_t> data;
//Maybe this goes faster somehow?
diff --git a/core/ustring.cpp b/core/ustring.cpp
index c2520a7a86..a039ba11cd 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -3635,7 +3635,7 @@ String String::percent_decode() const {
CharString cs = utf8();
for(int i=0;i<cs.length();i++) {
-
+
uint8_t c = cs[i];
if (c=='%' && i<length()-2) {