removed duplicate includes and such

This commit is contained in:
tastytea 2018-03-31 00:12:34 +02:00
parent 2f7da8a99a
commit d6a208857f
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
11 changed files with 5 additions and 49 deletions

View File

@ -14,19 +14,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string>
#include <cstdint>
#include <iostream>
#include <chrono>
#include <jsoncpp/json/json.h>
#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;
}

View File

@ -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 <mastodon-cpp/easy.hpp>
#include <mastodon-cpp/easy/account.hpp>
#include <mastodon-cpp/easy/attachment.hpp>
#include <mastodon-cpp/easy/instance.hpp>
#include <mastodon-cpp/easy/card.hpp>
//#include <mastodon-cpp/easy/context.hpp>
#include <mastodon-cpp/easy/emoji.hpp>
#include <mastodon-cpp/easy/instance.hpp>
#include <mastodon-cpp/easy/list.hpp>
#include <mastodon-cpp/easy/mention.hpp>
//#include <mastodon-cpp/easy/notification.hpp>

View File

@ -14,17 +14,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string>
#include <sstream>
#include <array>
#include <jsoncpp/json/json.h>
#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;
}

View File

@ -14,16 +14,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string>
#include <sstream>
#include <jsoncpp/json/json.h>
#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;
}

View File

@ -14,15 +14,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string>
#include <jsoncpp/json/json.h>
#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)

View File

@ -14,15 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string>
#include <sstream>
#include <cstdint>
#include <chrono>
#include <ctime>
#include <iomanip> // get_time
#include <sstream>
#include <vector>
#include <jsoncpp/json/json.h>
#include "easy.hpp"
#include "macros.hpp"

View File

@ -14,16 +14,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string>
#include <sstream>
#include <jsoncpp/json/json.h>
#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)

View File

@ -14,17 +14,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string>
#include <sstream>
#include <vector>
#include <jsoncpp/json/json.h>
#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)

View File

@ -14,10 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string>
#include <jsoncpp/json/json.h>
#include "list.hpp"
#include "macros.hpp"
using namespace Mastodon;
using List = Easy::List;

View File

@ -14,14 +14,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string>
#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)

View File

@ -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)