Changed uint64_t to uint_fast64_t
This commit is contained in:
parent
f8530d09e8
commit
d37f1aefb7
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required (VERSION 3.7)
|
||||
project (mastodon-cpp
|
||||
VERSION 0.7.14
|
||||
VERSION 0.7.15
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
|
|
|
@ -53,12 +53,12 @@ const string Account::display_name() const
|
|||
return get_string("display_name");
|
||||
}
|
||||
|
||||
const std::uint64_t Account::followers_count() const
|
||||
const std::uint_fast64_t Account::followers_count() const
|
||||
{
|
||||
return get_uint64("followers_count");
|
||||
}
|
||||
|
||||
const std::uint64_t Account::following_count() const
|
||||
const std::uint_fast64_t Account::following_count() const
|
||||
{
|
||||
return get_uint64("following_count");
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ const string Account::header_static() const
|
|||
return get_string("header_static");
|
||||
}
|
||||
|
||||
const std::uint64_t Account::id() const
|
||||
const std::uint_fast64_t Account::id() const
|
||||
{
|
||||
return std::stoull(get_string("id"));
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ const bool Account::sensitive() const
|
|||
return get_bool("source.sensitive");
|
||||
}
|
||||
|
||||
const std::uint64_t Account::statuses_count() const
|
||||
const std::uint_fast64_t Account::statuses_count() const
|
||||
{
|
||||
return get_uint64("statuses_count");
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#endif
|
||||
|
||||
using std::string;
|
||||
using std::uint64_t;
|
||||
using std::uint_fast64_t;
|
||||
using std::chrono::system_clock;
|
||||
|
||||
namespace Mastodon
|
||||
|
@ -85,12 +85,12 @@ namespace Mastodon
|
|||
/*!
|
||||
* @brief Returns number of followers
|
||||
*/
|
||||
const uint64_t followers_count() const;
|
||||
const uint_fast64_t followers_count() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns number of people this account follows
|
||||
*/
|
||||
const uint64_t following_count() const;
|
||||
const uint_fast64_t following_count() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns URL of header image
|
||||
|
@ -105,7 +105,7 @@ namespace Mastodon
|
|||
/*!
|
||||
* @brief Returns account-ID
|
||||
*/
|
||||
const uint64_t id() const;
|
||||
const uint_fast64_t id() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns true if the account is locked
|
||||
|
@ -146,7 +146,7 @@ namespace Mastodon
|
|||
/*!
|
||||
* @brief Returns number of statuses
|
||||
*/
|
||||
const uint64_t statuses_count() const;
|
||||
const uint_fast64_t statuses_count() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns URL of the profile
|
||||
|
|
|
@ -44,7 +44,7 @@ const string Attachment::description() const
|
|||
return get_string("description");
|
||||
}
|
||||
|
||||
const std::array<uint64_t, 2> Attachment::focus() const
|
||||
const std::array<uint_fast64_t, 2> Attachment::focus() const
|
||||
{
|
||||
const Json::Value x = get("meta.focus.x");
|
||||
const Json::Value y = get("meta.focus.y");
|
||||
|
@ -60,17 +60,17 @@ const std::array<uint64_t, 2> Attachment::focus() const
|
|||
return {};
|
||||
}
|
||||
|
||||
const uint64_t Attachment::height() const
|
||||
const uint_fast64_t Attachment::height() const
|
||||
{
|
||||
return get_uint64("meta.original.height");
|
||||
}
|
||||
|
||||
const uint64_t Attachment::height_small() const
|
||||
const uint_fast64_t Attachment::height_small() const
|
||||
{
|
||||
return get_uint64("meta.small.height");
|
||||
}
|
||||
|
||||
const std::uint64_t Attachment::id() const
|
||||
const std::uint_fast64_t Attachment::id() const
|
||||
{
|
||||
return std::stoull(get_string("id"));
|
||||
}
|
||||
|
@ -121,12 +121,12 @@ const string Attachment::url() const
|
|||
return get_string("url");
|
||||
}
|
||||
|
||||
const uint64_t Attachment::width() const
|
||||
const uint_fast64_t Attachment::width() const
|
||||
{
|
||||
return get_uint64("meta.original.width");
|
||||
}
|
||||
|
||||
const uint64_t Attachment::width_small() const
|
||||
const uint_fast64_t Attachment::width_small() const
|
||||
{
|
||||
return get_uint64("meta.small.width");
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
using std::string;
|
||||
using std::uint16_t;
|
||||
using std::uint64_t;
|
||||
using std::uint_fast64_t;
|
||||
|
||||
namespace Mastodon
|
||||
{
|
||||
|
@ -74,22 +74,22 @@ namespace Mastodon
|
|||
* @brief Returns the focus point (x, y)
|
||||
*/
|
||||
// TODO: find attachment with focus
|
||||
const std::array<uint64_t, 2> focus() const;
|
||||
const std::array<uint_fast64_t, 2> focus() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns the height of the original image
|
||||
*/
|
||||
const uint64_t height() const;
|
||||
const uint_fast64_t height() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns the height of the preview image
|
||||
*/
|
||||
const uint64_t height_small() const;
|
||||
const uint_fast64_t height_small() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns the ID of the attachment
|
||||
*/
|
||||
const uint64_t id() const;
|
||||
const uint_fast64_t id() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns the URL of the preview image
|
||||
|
@ -129,18 +129,18 @@ namespace Mastodon
|
|||
/*!
|
||||
* @brief Returns the width of the original image
|
||||
*/
|
||||
const uint64_t width() const;
|
||||
const uint_fast64_t width() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns the width of the preview image
|
||||
*/
|
||||
const uint64_t width_small() const;
|
||||
const uint_fast64_t width_small() const;
|
||||
|
||||
|
||||
// TODO: find an attachment with framerate, duration or bitrate set
|
||||
// const uint16_t framerate() const;
|
||||
// const std::chrono::seconds duration() const;
|
||||
// const uint64_t bitrate() const;
|
||||
// const uint_fast64_t bitrate() const;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ const string Card::description() const
|
|||
return get_string("description");
|
||||
}
|
||||
|
||||
const uint64_t Card::height() const
|
||||
const uint_fast64_t Card::height() const
|
||||
{
|
||||
return get_uint64("height");
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ const string Card::url() const
|
|||
return get_string("url");
|
||||
}
|
||||
|
||||
const uint64_t Card::width() const
|
||||
const uint_fast64_t Card::width() const
|
||||
{
|
||||
return get_uint64("width");
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#endif
|
||||
|
||||
using std::string;
|
||||
using std::uint64_t;
|
||||
using std::uint_fast64_t;
|
||||
|
||||
namespace Mastodon
|
||||
{
|
||||
|
@ -70,7 +70,7 @@ namespace Mastodon
|
|||
/*!
|
||||
* @brief Returns the height of the card
|
||||
*/
|
||||
const uint64_t height() const;
|
||||
const uint_fast64_t height() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns the HTML
|
||||
|
@ -110,7 +110,7 @@ namespace Mastodon
|
|||
/*!
|
||||
* @brief Returns the width of the card
|
||||
*/
|
||||
const uint64_t width() const;
|
||||
const uint_fast64_t width() const;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
using namespace Mastodon;
|
||||
using std::string;
|
||||
using std::uint64_t;
|
||||
using std::uint_fast64_t;
|
||||
using std::chrono::system_clock;
|
||||
|
||||
Easy::Easy(const string &instance, const string &access_token)
|
||||
|
@ -124,7 +124,7 @@ const string Easy::Entity::get_string(const string &key) const
|
|||
return "";
|
||||
}
|
||||
|
||||
const uint64_t Easy::Entity::get_uint64(const string &key) const
|
||||
const uint_fast64_t Easy::Entity::get_uint64(const string &key) const
|
||||
{
|
||||
const Json::Value node = get(key);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#endif
|
||||
|
||||
using std::string;
|
||||
using std::uint64_t;
|
||||
using std::uint_fast64_t;
|
||||
using std::chrono::system_clock;
|
||||
|
||||
namespace Mastodon
|
||||
|
@ -147,11 +147,11 @@ public:
|
|||
const string get_string(const string &key) const;
|
||||
|
||||
/*!
|
||||
* @brief Returns the value of key as std::uint64_t
|
||||
* @brief Returns the value of key as std::uint_fast64_t
|
||||
*
|
||||
* Returns 0 on error.
|
||||
*/
|
||||
const uint64_t get_uint64(const string &key) const;
|
||||
const uint_fast64_t get_uint64(const string &key) const;
|
||||
|
||||
/*!
|
||||
* @brief Returns the value of key as double
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
using namespace Mastodon;
|
||||
using List = Easy::List;
|
||||
using std::string;
|
||||
using std::uint64_t;
|
||||
using std::uint_fast64_t;
|
||||
|
||||
List::List(const string &json)
|
||||
: Entity(json)
|
||||
|
@ -29,7 +29,7 @@ List::List()
|
|||
: Entity()
|
||||
{}
|
||||
|
||||
const uint64_t List::id() const
|
||||
const uint_fast64_t List::id() const
|
||||
{
|
||||
return std::stoull(get_string("id"));
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#endif
|
||||
|
||||
using std::string;
|
||||
using std::uint64_t;
|
||||
using std::uint_fast64_t;
|
||||
|
||||
namespace Mastodon
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ namespace Mastodon
|
|||
/*!
|
||||
* @brief Returns list-ID
|
||||
*/
|
||||
const uint64_t id() const;
|
||||
const uint_fast64_t id() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns title
|
||||
|
|
|
@ -32,7 +32,7 @@ const string Mention::acct() const
|
|||
return get_string("acct");
|
||||
}
|
||||
|
||||
const uint64_t Mention::id() const
|
||||
const uint_fast64_t Mention::id() const
|
||||
{
|
||||
return std::stoull(get_string("id"));
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#endif
|
||||
|
||||
using std::string;
|
||||
using std::uint64_t;
|
||||
using std::uint_fast64_t;
|
||||
using std::chrono::system_clock;
|
||||
|
||||
namespace Mastodon
|
||||
|
@ -61,7 +61,7 @@ namespace Mastodon
|
|||
/*!
|
||||
* @brief Returns account ID
|
||||
*/
|
||||
const uint64_t id() const;
|
||||
const uint_fast64_t id() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns the URL of user's profile
|
||||
|
|
|
@ -45,7 +45,7 @@ const system_clock::time_point Notification::created_at() const
|
|||
return get_time_point("created_at");
|
||||
}
|
||||
|
||||
const uint64_t Notification::id() const
|
||||
const uint_fast64_t Notification::id() const
|
||||
{
|
||||
return std::stoull(get_string("id"));
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#endif
|
||||
|
||||
using std::string;
|
||||
using std::uint64_t;
|
||||
using std::uint_fast64_t;
|
||||
using std::chrono::system_clock;
|
||||
|
||||
namespace Mastodon
|
||||
|
@ -71,7 +71,7 @@ namespace Mastodon
|
|||
/*!
|
||||
* @brief Returns notification ID
|
||||
*/
|
||||
const uint64_t id() const;
|
||||
const uint_fast64_t id() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns the Status associated with the notification, if
|
||||
|
|
|
@ -47,7 +47,7 @@ const bool Relationship::following() const
|
|||
return get_bool("following");
|
||||
}
|
||||
|
||||
const uint64_t Relationship::id() const
|
||||
const uint_fast64_t Relationship::id() const
|
||||
{
|
||||
return std::stoull(get_string("id"));
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#endif
|
||||
|
||||
using std::string;
|
||||
using std::uint64_t;
|
||||
using std::uint_fast64_t;
|
||||
|
||||
namespace Mastodon
|
||||
{
|
||||
|
@ -75,7 +75,7 @@ namespace Mastodon
|
|||
/*!
|
||||
* @brief Returns the target account ID
|
||||
*/
|
||||
const uint64_t id() const;
|
||||
const uint_fast64_t id() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns true if the user is muting the account
|
||||
|
|
|
@ -32,7 +32,7 @@ const bool Report::action_taken() const
|
|||
return get_bool("action_taken");
|
||||
}
|
||||
|
||||
const uint64_t Report::id() const
|
||||
const uint_fast64_t Report::id() const
|
||||
{
|
||||
return std::stoull(get_string("id"));
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#endif
|
||||
|
||||
using std::string;
|
||||
using std::uint64_t;
|
||||
using std::uint_fast64_t;
|
||||
|
||||
namespace Mastodon
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ namespace Mastodon
|
|||
/*!
|
||||
* @brief Returns the ID of the report
|
||||
*/
|
||||
const uint64_t id() const;
|
||||
const uint_fast64_t id() const;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -85,22 +85,22 @@ const bool Status::favourited() const
|
|||
return get_bool("favourited");
|
||||
}
|
||||
|
||||
const uint64_t Status::favourites_count() const
|
||||
const uint_fast64_t Status::favourites_count() const
|
||||
{
|
||||
return get_uint64("favourites_count");
|
||||
}
|
||||
|
||||
const uint64_t Status::id() const
|
||||
const uint_fast64_t Status::id() const
|
||||
{
|
||||
return get_uint64("id");
|
||||
}
|
||||
|
||||
const uint64_t Status::in_reply_to_id() const
|
||||
const uint_fast64_t Status::in_reply_to_id() const
|
||||
{
|
||||
return get_uint64("in_reply_to_id");
|
||||
}
|
||||
|
||||
const uint64_t Status::in_reply_to_account_id() const
|
||||
const uint_fast64_t Status::in_reply_to_account_id() const
|
||||
{
|
||||
return get_uint64("in_reply_to_account_id");
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ const bool Status::reblogged() const
|
|||
return get_bool("reblogged");
|
||||
}
|
||||
|
||||
const uint64_t Status::reblogs_count() const
|
||||
const uint_fast64_t Status::reblogs_count() const
|
||||
{
|
||||
return get_uint64("reblogs_count");
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#endif
|
||||
|
||||
using std::string;
|
||||
using std::uint64_t;
|
||||
using std::uint_fast64_t;
|
||||
using std::chrono::system_clock;
|
||||
|
||||
namespace Mastodon
|
||||
|
@ -100,22 +100,22 @@ namespace Mastodon
|
|||
/*!
|
||||
* @brief Returns the number of favourites
|
||||
*/
|
||||
const uint64_t favourites_count() const;
|
||||
const uint_fast64_t favourites_count() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns the ID of the status
|
||||
*/
|
||||
const uint64_t id() const;
|
||||
const uint_fast64_t id() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns the ID of the status it replies to
|
||||
*/
|
||||
const uint64_t in_reply_to_id() const;
|
||||
const uint_fast64_t in_reply_to_id() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns the ID of the account it replies to
|
||||
*/
|
||||
const uint64_t in_reply_to_account_id() const;
|
||||
const uint_fast64_t in_reply_to_account_id() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns the language of the status
|
||||
|
@ -155,7 +155,7 @@ namespace Mastodon
|
|||
/*!
|
||||
* @brief Returns the number of reblogs for the status
|
||||
*/
|
||||
const uint64_t reblogs_count() const;
|
||||
const uint_fast64_t reblogs_count() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns true if the attachments should be hidden by default
|
||||
|
|
Reference in New Issue