Use brace initializer for exceptions.

This commit is contained in:
tastytea 2020-03-06 06:43:51 +01:00
parent 2ee354c7a3
commit 88ead94bff
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ string MastodonAPI::get_stream_id(const stream_type type,
{ {
if (!id) if (!id)
{ {
throw runtime_error("No hashtag given."); throw runtime_error{"No hashtag given."};
} }
return string("hashtag_") += id.value(); return string("hashtag_") += id.value();
break; break;
@ -87,7 +87,7 @@ string MastodonAPI::get_stream_id(const stream_type type,
{ {
if (!id) if (!id)
{ {
throw runtime_error("No list ID given."); throw runtime_error{"No list ID given."};
} }
return string("list_") += id.value(); return string("list_") += id.value();
break; break;