summaryrefslogtreecommitdiff
path: root/src/parsedate
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2018-07-16 14:58:45 +0200
committerKonstantin Käfer <mail@kkaefer.com>2018-07-16 18:25:09 +0200
commit77894f0586244049f62682945ed358ca738aa8e0 (patch)
tree864fe3353efefe398195bf051e12c14041d5bc28 /src/parsedate
parent561e55eb6c67f96ea05b471930bbd365dc44629d (diff)
downloadqtlocation-mapboxgl-77894f0586244049f62682945ed358ca738aa8e0.tar.gz
[core] treat parsedate as C++ file to remove C build rules
It is already wrapped with #ifdef __cplusplus extern "C", so we can safely compile it as C++ but retain C linkage
Diffstat (limited to 'src/parsedate')
-rw-r--r--src/parsedate/parsedate.cpp (renamed from src/parsedate/parsedate.c)4
-rw-r--r--src/parsedate/parsedate.hpp (renamed from src/parsedate/parsedate.h)0
2 files changed, 2 insertions, 2 deletions
diff --git a/src/parsedate/parsedate.c b/src/parsedate/parsedate.cpp
index 7228c4edbc..ff945589bb 100644
--- a/src/parsedate/parsedate.c
+++ b/src/parsedate/parsedate.cpp
@@ -73,7 +73,7 @@
*/
-#include "parsedate.h"
+#include "parsedate.hpp"
@@ -671,7 +671,7 @@ static int parsedate(const char *date, time_t *output)
time_t parse_date(const char *p)
{
- time_t parsed;
+ time_t parsed = -1;
int rc = parsedate(p, &parsed);
switch(rc) {
diff --git a/src/parsedate/parsedate.h b/src/parsedate/parsedate.hpp
index 6905e361d4..6905e361d4 100644
--- a/src/parsedate/parsedate.h
+++ b/src/parsedate/parsedate.hpp