From d6a208857fb2311f2dd5fcff86654cc8aff141c3 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 31 Mar 2018 00:12:34 +0200 Subject: [PATCH] removed duplicate includes and such --- src/easy/account.cpp | 9 +-------- src/easy/all.hpp | 3 ++- src/easy/attachment.cpp | 6 +----- src/easy/card.cpp | 6 +----- src/easy/context.cpp | 5 ----- src/easy/easy.cpp | 6 ------ src/easy/emoji.cpp | 5 ----- src/easy/instance.cpp | 5 ----- src/easy/list.cpp | 3 --- src/easy/mention.cpp | 4 ---- src/easy/notification.cpp | 2 -- 11 files changed, 5 insertions(+), 49 deletions(-) diff --git a/src/easy/account.cpp b/src/easy/account.cpp index 229188a..0838703 100644 --- a/src/easy/account.cpp +++ b/src/easy/account.cpp @@ -14,19 +14,11 @@ * along with this program. If not, see . */ -#include -#include -#include -#include -#include #include "account.hpp" #include "macros.hpp" using namespace Mastodon; using Account = Easy::Account; -using std::string; -using std::uint64_t; -using std::chrono::system_clock; Account::Account(const string &json) : Entity(json) @@ -134,6 +126,7 @@ const Easy::visibility Account::privacy() const else if (strprivacy.compare("direct") == 0) return visibility::Direct; + ttdebug << "Could not get data: source.privacy\n"; return visibility::Undefined; } diff --git a/src/easy/all.hpp b/src/easy/all.hpp index e32a10f..68a40e4 100644 --- a/src/easy/all.hpp +++ b/src/easy/all.hpp @@ -17,6 +17,7 @@ #ifndef MASTODON_CPP_EASY_ALL_HPP #define MASTODON_CPP_EASY_ALL_HPP +// If we are compiling mastodon-cpp, use another include path #ifdef MASTODON_CPP #include "easy.hpp" #include "easy/account.hpp" @@ -32,10 +33,10 @@ #include #include #include - #include #include //#include #include + #include #include #include //#include diff --git a/src/easy/attachment.cpp b/src/easy/attachment.cpp index ece9766..7ce1c9d 100644 --- a/src/easy/attachment.cpp +++ b/src/easy/attachment.cpp @@ -14,17 +14,12 @@ * along with this program. If not, see . */ -#include #include -#include -#include #include "attachment.hpp" #include "macros.hpp" using namespace Mastodon; using Attachment = Easy::Attachment; -using std::string; -using std::uint64_t; Attachment::Attachment(const string &json) : Entity(json) @@ -117,6 +112,7 @@ const Easy::attachment_type Attachment::type() const else if (strtype.compare("unknown") == 0) return attachment_type::unknown; + ttdebug << "Could not get data: type\n"; return attachment_type::unknown; } diff --git a/src/easy/card.cpp b/src/easy/card.cpp index b3418b9..86f0df4 100644 --- a/src/easy/card.cpp +++ b/src/easy/card.cpp @@ -14,16 +14,11 @@ * along with this program. If not, see . */ -#include -#include -#include #include "card.hpp" #include "macros.hpp" using namespace Mastodon; using Card = Easy::Card; -using std::string; -using std::uint64_t; Card::Card(const string &json) : Entity(json) @@ -90,6 +85,7 @@ const Easy::card_type Card::type() const else if (strtype.compare("rich") == 0) return card_type::rich; + ttdebug << "Could not get data: type\n"; return card_type::unknown; } diff --git a/src/easy/context.cpp b/src/easy/context.cpp index 04e359d..d206c1d 100644 --- a/src/easy/context.cpp +++ b/src/easy/context.cpp @@ -14,15 +14,10 @@ * along with this program. If not, see . */ -#include -#include #include "context.hpp" -#include "macros.hpp" using namespace Mastodon; using Context = Easy::Context; -using std::string; -using std::uint64_t; Context::Context(const string &json) : Entity(json) diff --git a/src/easy/easy.cpp b/src/easy/easy.cpp index 2d0970c..6d5d4ee 100644 --- a/src/easy/easy.cpp +++ b/src/easy/easy.cpp @@ -14,15 +14,9 @@ * along with this program. If not, see . */ -#include -#include -#include -#include #include #include // get_time #include -#include -#include #include "easy.hpp" #include "macros.hpp" diff --git a/src/easy/emoji.cpp b/src/easy/emoji.cpp index ea91df9..3782b02 100644 --- a/src/easy/emoji.cpp +++ b/src/easy/emoji.cpp @@ -14,16 +14,11 @@ * along with this program. If not, see . */ -#include -#include -#include #include "emoji.hpp" #include "macros.hpp" using namespace Mastodon; using Emoji = Easy::Emoji; -using std::string; -using std::uint64_t; Emoji::Emoji(const string &json) : Entity(json) diff --git a/src/easy/instance.cpp b/src/easy/instance.cpp index d29f32d..95c6eb8 100644 --- a/src/easy/instance.cpp +++ b/src/easy/instance.cpp @@ -14,17 +14,12 @@ * along with this program. If not, see . */ -#include -#include -#include -#include #include "instance.hpp" #include "account.hpp" #include "macros.hpp" using namespace Mastodon; using Instance = Easy::Instance; -using std::string; Instance::Instance(const string &json) : Entity(json) diff --git a/src/easy/list.cpp b/src/easy/list.cpp index 3fc6ed8..338e08b 100644 --- a/src/easy/list.cpp +++ b/src/easy/list.cpp @@ -14,10 +14,7 @@ * along with this program. If not, see . */ -#include -#include #include "list.hpp" -#include "macros.hpp" using namespace Mastodon; using List = Easy::List; diff --git a/src/easy/mention.cpp b/src/easy/mention.cpp index aaeba8a..65bf152 100644 --- a/src/easy/mention.cpp +++ b/src/easy/mention.cpp @@ -14,14 +14,10 @@ * along with this program. If not, see . */ -#include #include "mention.hpp" -#include "macros.hpp" using namespace Mastodon; using Mention = Easy::Mention; -using std::string; -using std::uint64_t; Mention::Mention(const string &json) : Entity(json) diff --git a/src/easy/notification.cpp b/src/easy/notification.cpp index 7d6878d..77dce58 100644 --- a/src/easy/notification.cpp +++ b/src/easy/notification.cpp @@ -19,8 +19,6 @@ using namespace Mastodon; using Notification = Easy::Notification; -using std::string; -using std::uint64_t; Notification::Notification(const string &json) : Entity(json)