Added type conversion for IDs (string->uint64)
This commit is contained in:
parent
c1174c0061
commit
f8530d09e8
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required (VERSION 3.7)
|
||||
project (mastodon-cpp
|
||||
VERSION 0.7.13
|
||||
VERSION 0.7.14
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ const string Account::header_static() const
|
|||
|
||||
const std::uint64_t Account::id() const
|
||||
{
|
||||
return get_uint64("id");
|
||||
return std::stoull(get_string("id"));
|
||||
}
|
||||
|
||||
const bool Account::locked() const
|
||||
|
|
|
@ -72,7 +72,7 @@ const uint64_t Attachment::height_small() const
|
|||
|
||||
const std::uint64_t Attachment::id() const
|
||||
{
|
||||
return get_uint64("id");
|
||||
return std::stoull(get_string("id"));
|
||||
}
|
||||
|
||||
const string Attachment::preview_url() const
|
||||
|
|
|
@ -31,7 +31,7 @@ List::List()
|
|||
|
||||
const uint64_t List::id() const
|
||||
{
|
||||
return get_uint64("id");
|
||||
return std::stoull(get_string("id"));
|
||||
}
|
||||
|
||||
const string List::title() const
|
||||
|
|
|
@ -34,7 +34,7 @@ const string Mention::acct() const
|
|||
|
||||
const uint64_t Mention::id() const
|
||||
{
|
||||
return get_uint64("id");
|
||||
return std::stoull(get_string("id"));
|
||||
}
|
||||
|
||||
const string Mention::url() const
|
||||
|
|
|
@ -47,7 +47,7 @@ const system_clock::time_point Notification::created_at() const
|
|||
|
||||
const uint64_t Notification::id() const
|
||||
{
|
||||
return get_uint64("id");
|
||||
return std::stoull(get_string("id"));
|
||||
}
|
||||
|
||||
const Easy::Status Notification::status() const
|
||||
|
|
|
@ -49,7 +49,7 @@ const bool Relationship::following() const
|
|||
|
||||
const uint64_t Relationship::id() const
|
||||
{
|
||||
return get_uint64("id");
|
||||
return std::stoull(get_string("id"));
|
||||
}
|
||||
|
||||
const bool Relationship::muting() const
|
||||
|
|
|
@ -34,6 +34,6 @@ const bool Report::action_taken() const
|
|||
|
||||
const uint64_t Report::id() const
|
||||
{
|
||||
return get_uint64("id");
|
||||
return std::stoull(get_string("id"));
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue