Added type conversion for IDs (string->uint64)

This commit is contained in:
tastytea 2018-03-31 19:29:03 +02:00
parent c1174c0061
commit f8530d09e8
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
8 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.7)
project (mastodon-cpp
VERSION 0.7.13
VERSION 0.7.14
LANGUAGES CXX
)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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"));
}