From 3bb42ca79959f35a8bb38a0633228b8e188bf175 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Thu, 28 Nov 2019 01:33:17 +0100 Subject: [PATCH] Fix wrong rapidjson include on Appveyor --- appveyor.yml | 2 +- libretroshare/src/serialiser/rstypeserializer.cc | 5 ----- libretroshare/src/use_libretroshare.pri | 3 +-- libretroshare/src/util/rsjson.cc | 15 ++++----------- libretroshare/src/util/rsjson.h | 7 +------ 5 files changed, 7 insertions(+), 25 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 98686b717..786100b59 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -90,7 +90,7 @@ install: # Configuring MSys2 - set PATH=C:\msys64\usr\bin;%PATH% - set PATH=C:\msys64\mingw32\bin;%PATH% - - pacman --noconfirm -S mingw-w64-i686-qt5 mingw-w64-i686-miniupnpc mingw-w64-i686-sqlcipher mingw-w64-i686-libmicrohttpd mingw-w64-i686-xapian-core mingw-w64-i686-cmark + - pacman --noconfirm -S mingw-w64-i686-qt5 mingw-w64-i686-miniupnpc mingw-w64-i686-rapidjson mingw-w64-i686-sqlcipher mingw-w64-i686-xapian-core mingw-w64-i686-cmark #- pacman --noconfirm -S mingw-w64-i686-qt5-static mingw-w64-i686-miniupnpc mingw-w64-i686-sqlcipher mingw-w64-i686-libmicrohttpd #- set PATH=C:\msys64\mingw32\qt5-static\bin\;%PATH% diff --git a/libretroshare/src/serialiser/rstypeserializer.cc b/libretroshare/src/serialiser/rstypeserializer.cc index c166ce39c..47fd99e45 100644 --- a/libretroshare/src/serialiser/rstypeserializer.cc +++ b/libretroshare/src/serialiser/rstypeserializer.cc @@ -32,12 +32,7 @@ #include #include #include // for typeid - -#ifdef HAS_RAPIDJSON #include -#else -#include -#endif // HAS_RAPIDJSON static constexpr uint32_t MAX_SERIALIZED_CHUNK_SIZE = 10*1024*1024 ; // 10 MB. diff --git a/libretroshare/src/use_libretroshare.pri b/libretroshare/src/use_libretroshare.pri index 9b9622574..11a9801d8 100644 --- a/libretroshare/src/use_libretroshare.pri +++ b/libretroshare/src/use_libretroshare.pri @@ -38,11 +38,10 @@ bitdht { # always possible to find them RAPIDJSON_AVAILABLE = $$system(pkg-config --atleast-version 1.1 RapidJSON && echo yes) isEmpty(RAPIDJSON_AVAILABLE) { - message("using built-in rapidjson") + message("using rapidjson from submodule") INCLUDEPATH *= $$clean_path($${PWD}/../../supportlibs/rapidjson/include) } else { message("using system rapidjson") - DEFINES *= HAS_RAPIDJSON } diff --git a/libretroshare/src/util/rsjson.cc b/libretroshare/src/util/rsjson.cc index 37f6282e4..8af1cf942 100644 --- a/libretroshare/src/util/rsjson.cc +++ b/libretroshare/src/util/rsjson.cc @@ -19,19 +19,12 @@ * * *******************************************************************************/ +#include +#include +#include + #include "util/rsjson.h" -#ifdef HAS_RAPIDJSON -# include -# include -# include -#else -# include -# include -# include -#endif // HAS_RAPIDJSON - - inline int getJsonManipulatorStatePosition() { static int p = std::ios_base::xalloc(); diff --git a/libretroshare/src/util/rsjson.h b/libretroshare/src/util/rsjson.h index 8bbb2a992..db864a73f 100644 --- a/libretroshare/src/util/rsjson.h +++ b/libretroshare/src/util/rsjson.h @@ -21,12 +21,7 @@ #pragma once #include - -#ifdef HAS_RAPIDJSON -# include -#else -# include -#endif // HAS_RAPIDJSON +#include /** * Use this type for JSON documents representations in RetroShare code