[gnome-contacts/wip/nielsdg/fix-warnings: 5/7] ContactsUtils: Fix dynamic cast warnings
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts/wip/nielsdg/fix-warnings: 5/7] ContactsUtils: Fix dynamic cast warnings
- Date: Sat, 2 May 2020 13:44:22 +0000 (UTC)
commit 14944bed0a5f40027ae8dc317e516c47d4aa1e1c
Author: Niels De Graef <nielsdegraef gmail com>
Date: Sun Apr 19 13:55:21 2020 +0200
ContactsUtils: Fix dynamic cast warnings
Vala 0.48 got a bit more strict on dynamic casts, so let's fix those
warnings.
src/contacts-utils.vala | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/src/contacts-utils.vala b/src/contacts-utils.vala
index 1e95fea..879c4a9 100644
--- a/src/contacts-utils.vala
+++ b/src/contacts-utils.vala
@@ -529,61 +529,61 @@ namespace Contacts.Utils {
* passed to the functions which currently call this one; but only once bgo#604827 is fixed. */
switch (property_name) {
case "alias":
- yield (persona as AliasDetails).change_alias ((string) new_value);
+ yield ((AliasDetails) persona).change_alias ((string) new_value);
break;
case "avatar":
- yield (persona as AvatarDetails).change_avatar ((LoadableIcon?) new_value);
+ yield ((AvatarDetails) persona).change_avatar ((LoadableIcon?) new_value);
break;
case "birthday":
- yield (persona as BirthdayDetails).change_birthday ((DateTime?) new_value);
+ yield ((BirthdayDetails) persona).change_birthday ((DateTime?) new_value);
break;
case "calendar-event-id":
- yield (persona as BirthdayDetails).change_calendar_event_id ((string?) new_value);
+ yield ((BirthdayDetails) persona).change_calendar_event_id ((string?) new_value);
break;
case "email-addresses":
- yield (persona as EmailDetails).change_email_addresses ((Set<EmailFieldDetails>) new_value);
+ yield ((EmailDetails) persona).change_email_addresses ((Set<EmailFieldDetails>) new_value);
break;
case "is-favourite":
- yield (persona as FavouriteDetails).change_is_favourite ((bool) new_value);
+ yield ((FavouriteDetails) persona).change_is_favourite ((bool) new_value);
break;
case "gender":
- yield (persona as GenderDetails).change_gender ((Gender) new_value);
+ yield ((GenderDetails) persona).change_gender ((Gender) new_value);
break;
case "groups":
- yield (persona as GroupDetails).change_groups ((Set<string>) new_value);
+ yield ((GroupDetails) persona).change_groups ((Set<string>) new_value);
break;
case "im-addresses":
- yield (persona as ImDetails).change_im_addresses ((MultiMap<string, ImFieldDetails>) new_value);
+ yield ((ImDetails) persona).change_im_addresses ((MultiMap<string, ImFieldDetails>) new_value);
break;
case "local-ids":
- yield (persona as LocalIdDetails).change_local_ids ((Set<string>) new_value);
+ yield ((LocalIdDetails) persona).change_local_ids ((Set<string>) new_value);
break;
case "structured-name":
- yield (persona as NameDetails).change_structured_name ((StructuredName?) new_value);
+ yield ((NameDetails) persona).change_structured_name ((StructuredName?) new_value);
break;
case "full-name":
- yield (persona as NameDetails).change_full_name ((string) new_value);
+ yield ((NameDetails) persona).change_full_name ((string) new_value);
break;
case "nickname":
- yield (persona as NameDetails).change_nickname ((string) new_value);
+ yield ((NameDetails) persona).change_nickname ((string) new_value);
break;
case "notes":
- yield (persona as NoteDetails).change_notes ((Set<NoteFieldDetails>) new_value);
+ yield ((NoteDetails) persona).change_notes ((Set<NoteFieldDetails>) new_value);
break;
case "phone-numbers":
- yield (persona as PhoneDetails).change_phone_numbers ((Set<PhoneFieldDetails>) new_value);
+ yield ((PhoneDetails) persona).change_phone_numbers ((Set<PhoneFieldDetails>) new_value);
break;
case "postal-addresses":
- yield (persona as PostalAddressDetails).change_postal_addresses ((Set<PostalAddressFieldDetails>)
new_value);
+ yield ((PostalAddressDetails) persona).change_postal_addresses ((Set<PostalAddressFieldDetails>)
new_value);
break;
case "roles":
- yield (persona as RoleDetails).change_roles ((Set<RoleFieldDetails>) new_value);
+ yield ((RoleDetails) persona).change_roles ((Set<RoleFieldDetails>) new_value);
break;
case "urls":
- yield (persona as UrlDetails).change_urls ((Set<UrlFieldDetails>) new_value);
+ yield ((UrlDetails) persona).change_urls ((Set<UrlFieldDetails>) new_value);
break;
case "web-service-addresses":
- yield (persona as WebServiceDetails).change_web_service_addresses ((MultiMap<string,
WebServiceFieldDetails>) new_value);
+ yield ((WebServiceDetails) persona).change_web_service_addresses ((MultiMap<string,
WebServiceFieldDetails>) new_value);
break;
default:
critical ("Unknown property '%s' in Contact.set_persona_property().", property_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]