From 84984bdfd0273b789e0c9bfe397440dd6912912d Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 13 Apr 2021 05:39:25 +0200 Subject: Include cppcodec instead of using it a system library. Its not available in ubuntu repos for example --- src/DownloadUtils.cpp | 4 ++-- src/QuickMedia.cpp | 6 +++--- src/plugins/Matrix.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/DownloadUtils.cpp b/src/DownloadUtils.cpp index e1c628c..e83bced 100644 --- a/src/DownloadUtils.cpp +++ b/src/DownloadUtils.cpp @@ -1,7 +1,7 @@ #include "../include/DownloadUtils.hpp" #include "../include/Program.hpp" #include "../include/Storage.hpp" -#include "../include/base64_url.hpp" +#include "../external/cppcodec/base64_url.hpp" #include #include #include @@ -55,7 +55,7 @@ namespace QuickMedia { Path media_file_path; if(cache_path.data.empty()) { media_dir = get_cache_dir().join("media"); - media_file_path = Path(media_dir).join(base64_url::encode(url)); + media_file_path = Path(media_dir).join(cppcodec::base64_url::encode(url)); } else { media_dir = cache_path.parent(); media_file_path = std::move(cache_path); diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index e49cb74..fad2b94 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -22,7 +22,7 @@ #include "../include/Notification.hpp" #include "../include/ImageViewer.hpp" #include "../include/ImageUtils.hpp" -#include "../include/base64_url.hpp" +#include "../external/cppcodec/base64_url.hpp" #include "../include/Entry.hpp" #include "../include/NetUtils.hpp" #include "../include/SfmlFixes.hpp" @@ -863,11 +863,11 @@ namespace QuickMedia { } static std::string base64_encode(const std::string &data) { - return base64_url::encode(data); + return cppcodec::base64_url::encode(data); } static std::string base64_decode(const std::string &data) { - return base64_url::decode(data); + return cppcodec::base64_url::decode(data); } enum class SearchSuggestionTab { diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index 9568244..e1f9b58 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -4,7 +4,7 @@ #include "../../include/NetUtils.hpp" #include "../../include/Notification.hpp" #include "../../include/Program.hpp" -#include "../../include/base64_url.hpp" +#include "../../external/cppcodec/base64_url.hpp" #include "../../include/Json.hpp" #include "../../include/AsyncImageLoader.hpp" #include "../../include/Utils.hpp" @@ -3103,7 +3103,7 @@ namespace QuickMedia { } return true; - }, get_cache_dir().join("matrix").join("events").join(base64_url::encode(event_id))); + }, get_cache_dir().join("matrix").join("events").join(cppcodec::base64_url::encode(event_id))); if(download_result != DownloadResult::OK) { fprintf(stderr, "Failed to get message by id %s, error: %s\n", event_id.c_str(), response.c_str()); room->fetched_messages_by_event_id.insert(std::make_pair(event_id, nullptr)); -- cgit v1.2.3