diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-04-13 05:39:25 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-04-13 05:41:53 +0200 |
commit | 84984bdfd0273b789e0c9bfe397440dd6912912d (patch) | |
tree | b509e5d48e27d727429a39a8b48fda10145875e7 /src | |
parent | bc26e012f3041529939d38ac522c18499ddff982 (diff) |
Include cppcodec instead of using it a system library. Its not available in ubuntu repos for example
Diffstat (limited to 'src')
-rw-r--r-- | src/DownloadUtils.cpp | 4 | ||||
-rw-r--r-- | src/QuickMedia.cpp | 6 | ||||
-rw-r--r-- | src/plugins/Matrix.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
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 <SFML/System/Clock.hpp> #include <rapidjson/document.h> #include <rapidjson/filereadstream.h> @@ -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<std::string>(data); + return cppcodec::base64_url::decode<std::string>(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)); |